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.
4!
5! Contributed by Lester Petrie <petrielmjr@ornl.gov>
6!
7module 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
13
14subroutine 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
22end subroutine nudata
23
24  integer  :: l_(2) = (/1,2/), nlibe_ = 42
25  real :: a_(2) = (/1.,2./)
26  call nudata (nlibe_, a_, l_)
27end
28