annotate gcc/testsuite/gfortran.dg/use_rename_3.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Tests the fix for PR35997, in which the use association of renamed
kono
parents:
diff changeset
3 ! valid2 and flag2 was treated as if the renaming were done on use
kono
parents:
diff changeset
4 ! association in the main program. Thus, the following, direct use
kono
parents:
diff changeset
5 ! association of valid and flag did not occur.
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 ! Contributed by Drew McCormack <drewmccormack@mac.com>
kono
parents:
diff changeset
8 !
kono
parents:
diff changeset
9 module funcinterfacemod
kono
parents:
diff changeset
10 interface
kono
parents:
diff changeset
11 logical function valid ()
kono
parents:
diff changeset
12 end function
kono
parents:
diff changeset
13 end interface
kono
parents:
diff changeset
14 logical :: flag = .true.
kono
parents:
diff changeset
15 end module
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 module secondmod
kono
parents:
diff changeset
18 use funcinterfacemod, valid2 => valid, flag2 => flag
kono
parents:
diff changeset
19 end module
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 logical function valid ()
kono
parents:
diff changeset
22 valid = .true.
kono
parents:
diff changeset
23 end function
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 program main
kono
parents:
diff changeset
26 use secondmod
kono
parents:
diff changeset
27 use funcinterfacemod
kono
parents:
diff changeset
28 if (valid ()) then
kono
parents:
diff changeset
29 print *, 'Is Valid'
kono
parents:
diff changeset
30 endif
kono
parents:
diff changeset
31 if (flag) then
kono
parents:
diff changeset
32 print *, 'Is flag'
kono
parents:
diff changeset
33 endif
kono
parents:
diff changeset
34 end program