Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / global_vars_c_init.f90
blobcd6893255295dc88cebe7a8fc8677c99e82d0635
1 ! { dg-do run }
2 ! { dg-additional-sources global_vars_c_init_driver.c }
3 module global_vars_c_init
4 use, intrinsic :: iso_c_binding, only: c_int
5 implicit none
7 integer(c_int), bind(c, name='i') :: I
9 contains
10 subroutine test_globals() bind(c)
11 ! the value of I is initialized above
12 if(I .ne. 2) then
13 STOP 1
14 endif
15 end subroutine test_globals
16 end module global_vars_c_init