Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/global_vars_f90_init.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! { dg-additional-sources global_vars_f90_init_driver.c } | |
3 module global_vars_f90_init | |
4 use, intrinsic :: iso_c_binding, only: c_int | |
5 implicit none | |
6 | |
7 integer(c_int), bind(c, name='i') :: I = 2 | |
8 | |
9 contains | |
10 subroutine test_globals() bind(c) | |
11 ! the value of I is initialized above | |
12 if(I .ne. 2) then | |
131 | 13 STOP 1 |
111 | 14 endif |
15 end subroutine test_globals | |
16 end module global_vars_f90_init |