nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / use_rename_3.f90
blob33b21e59e1027b9c843a226fbe25f89fb5771b36
1 ! { dg-do compile }
2 ! Tests the fix for PR35997, in which the use association of renamed
3 ! valid2 and flag2 was treated as if the renaming were done on use
4 ! association in the main program. Thus, the following, direct use
5 ! association of valid and flag did not occur.
7 ! Contributed by Drew McCormack <drewmccormack@mac.com>
9 module funcinterfacemod
10 interface
11 logical function valid ()
12 end function
13 end interface
14 logical :: flag = .true.
15 end module
17 module secondmod
18 use funcinterfacemod, valid2 => valid, flag2 => flag
19 end module
21 logical function valid ()
22 valid = .true.
23 end function
25 program main
26 use secondmod
27 use funcinterfacemod
28 if (valid ()) then
29 print *, 'Is Valid'
30 endif
31 if (flag) then
32 print *, 'Is flag'
33 endif
34 end program