gcc/testsuite/gfortran.dg/bind_c_usage_34.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/104332 - ICE with bind(c) in block data |
| 3 | ! Contributed by G. Steinmetz |
| 4 | |
| 5 | block data |
| 6 | bind(c) :: a ! { dg-error "cannot be BIND\\(C\\)" } |
| 7 | end |
| 8 | |
| 9 | block data aa |
| 10 | real, bind(c) :: a ! { dg-error "cannot be BIND\\(C\\)" } |
| 11 | end |
| 12 | |
| 13 | block data bb |
| 14 | real :: a ! { dg-error "cannot be BIND\\(C\\)" } |
| 15 | bind(c) :: a |
| 16 | end |
| 17 | |
| 18 | block data cc |
| 19 | common /a/ x |
| 20 | bind(c) :: /a/ |
| 21 | end |