gcc/testsuite/gfortran.dg/data_char_5.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/99205 - Issues with non-constant character length |
| 3 | |
| 4 | subroutine sub () |
| 5 | integer :: ll = 4 |
| 6 | block |
| 7 | character(ll) :: c(2) |
| 8 | data c /'a', 'b'/ ! { dg-error "Non-constant character length" } |
| 9 | end block |
| 10 | contains |
| 11 | subroutine sub1 () |
| 12 | character(ll) :: d(2) |
| 13 | data d /'a', 'b'/ ! { dg-error "Non-constant character length" } |
| 14 | end subroutine sub1 |
| 15 | end subroutine sub |