aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/binding_label_tests_16.f03
blob: 7029b2ea1915597dbc17397934696bbaf331fdec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do run }
! Verify that the variables 'a' in both modules don't collide.
module m
  use iso_c_binding
  implicit none
  integer(c_int), save, bind(C, name="") :: a = 5
end module m

module n
  use iso_c_binding
  implicit none
  integer(c_int), save, bind(C,name="") :: a = -5
end module n

program prog
use m
use n, b=>a
implicit none
  print *, a, b
  if (a /= 5 .or. b /= -5) call abort()
end program prog