2 ! { dg-additional-sources bind_c_coms_driver.c }
4 ! the -w option is to prevent the warning about long long ints
6 use, intrinsic :: iso_c_binding
13 bind(c
) :: /COM
/, /SINGLE
/, /MYCOM
/
15 common /MYCOM
/ LONG_INTS
16 integer(c_long
) :: LONG_INTS
17 common /MYCOM2
/ LONG_LONG_INTS
18 integer(c_long_long
) :: long_long_ints
22 integer(c_int
) :: i
, j
23 bind(c
, name
="f03_com2") /com2
/
26 integer(c_int
) :: m
, n
27 bind(c
, name
="") /com3
/
30 subroutine test_coms() bind(c
)
34 long_ints
= long_ints
+ 1
35 long_long_ints
= long_long_ints
+ 1
41 end subroutine test_coms
42 end module bind_c_coms
45 use, intrinsic :: iso_c_binding
, only
: c_int
47 integer(c_int
) :: m
, n
48 bind(c
, name
="") /com3
/
49 end module bind_c_coms_2
51 ! { dg-final { cleanup-modules "bind_c_coms bind_c_coms_2" } }