Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / binding_label_tests_16.f03
blobb7f6e034c77bde920e17289a580e3be071884e57
1 ! { dg-do run }
2 ! Verify that the variables 'a' in both modules don't collide.
3 module m
4   use iso_c_binding
5   implicit none
6   integer(c_int), save, bind(C, name="") :: a = 5
7 end module m
9 module n
10   use iso_c_binding
11   implicit none
12   integer(c_int), save, bind(C,name="") :: a = -5
13 end module n
15 program prog
16 use m
17 use n, b=>a
18 implicit none
19   print *, a, b
20   if (a /= 5 .or. b /= -5) STOP 1
21 end program prog