URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do compile }
|
! { dg-do compile }
|
! { dg-options "-O0" }
|
! { dg-options "-O0" }
|
! Tests the fix for PR24207 and the problems associated
|
! Tests the fix for PR24207 and the problems associated
|
! with the fix for PR21986. In two cases, use associated
|
! with the fix for PR21986. In two cases, use associated
|
! public symbols were taking on the default private access
|
! public symbols were taking on the default private access
|
! attribute of the local namespace. In the third, a private
|
! attribute of the local namespace. In the third, a private
|
! symbol was not available to a namelist in contained
|
! symbol was not available to a namelist in contained
|
! procedure in the same module.
|
! procedure in the same module.
|
!
|
!
|
! Based on the example in PR24207.
|
! Based on the example in PR24207.
|
!
|
!
|
module a
|
module a
|
implicit none
|
implicit none
|
real b
|
real b
|
type :: mytype
|
type :: mytype
|
integer :: c
|
integer :: c
|
end type mytype
|
end type mytype
|
end module a
|
end module a
|
module c
|
module c
|
use a
|
use a
|
implicit none
|
implicit none
|
public d
|
public d
|
private
|
private
|
real x
|
real x
|
contains
|
contains
|
subroutine d (arg_t) ! This would cause an error
|
subroutine d (arg_t) ! This would cause an error
|
type (mytype) :: arg_t
|
type (mytype) :: arg_t
|
namelist /e/ b, x ! .... as would this.
|
namelist /e/ b, x ! .... as would this.
|
read(5,e)
|
read(5,e)
|
arg_t%c = 42
|
arg_t%c = 42
|
end subroutine d
|
end subroutine d
|
end module c
|
end module c
|
|
|
! { dg-final { cleanup-modules "a c" } }
|
! { dg-final { cleanup-modules "a c" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.