2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / module_equivalence_4.f90
blob7a8ef9c7cdfd4728cceb0a50436d6e73e7499477
1 ! { dg-do compile }
2 ! This checks the fix for PR37706 in which the equivalence would be
3 ! inserted into the 'nudata' namespace with the inevitable consequences.
5 ! Contributed by Lester Petrie <petrielmjr@ornl.gov>
7 module data_C
8 integer, dimension(200) :: l = (/(201-i, i = 1,200)/)
9 integer :: l0
10 integer :: l24, l27, l28, l29
11 equivalence ( l(1), l0 )
12 end module data_C
14 subroutine nudata(nlibe, a, l)
15 USE data_C, only: l24, l27, l28, l29
16 implicit none
17 integer :: nlibe
18 integer :: l(*)
19 real :: a(*)
20 print *, l(1), l(2)
21 return
22 end subroutine nudata
24 integer :: l_(2) = (/1,2/), nlibe_ = 42
25 real :: a_(2) = (/1.,2./)
26 call nudata (nlibe_, a_, l_)
27 end
29 ! { dg-final { cleanup-modules "data_C" } }