gcc/testsuite/gfortran.dg/bind_c_usage_2.f03
raw| 1 | ! { dg-do compile } |
| 2 | use, intrinsic :: iso_c_binding |
| 3 | type, bind(c) :: mytype |
| 4 | integer(c_int) :: j |
| 5 | end type mytype |
| 6 | |
| 7 | type(mytype), bind(c) :: mytype_var ! { dg-error "cannot be BIND.C." } |
| 8 | |
| 9 | integer(c_int), bind(c) :: i ! { dg-error "cannot be declared with BIND.C." } |
| 10 | integer(c_int), bind(c), dimension(10) :: my_array ! { dg-error "cannot be BIND.C." } |
| 11 | |
| 12 | common /COM/ i |
| 13 | bind(c) :: /com/ |
| 14 | |
| 15 | end |