Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/binding_label_tests_16.f03 @ 128:fe568345ddd5
fix CbC-example
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 19:32:28 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
line wrap: on
line source
! { 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