| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fdec-structure" } |
| 3 |
! |
| 4 |
! PR fortran/78240 |
| 5 |
! |
| 6 |
! Test a regression where an ICE occurred attempting to create array variables |
| 7 |
! with non-constant array-specs in legacy clist initializers. |
| 8 |
! |
| 9 |
! Error message update with patch for PR fortran/83633 |
| 10 |
! |
| 11 |
program p |
| 12 |
implicit none |
| 13 |
integer :: nn |
| 14 |
real :: rr |
| 15 |
structure /s/ |
| 16 |
integer x(n) /1/ ! { dg-error "must be constant of INTEGER type" } |
| 17 |
integer xx(nn) /1/ ! { dg-error "array with nonconstant bounds" } |
| 18 |
integer xxx(rr) /1.0/ ! { dg-error "must be constant of INTEGER type" } |
| 19 |
end structure |
| 20 |
end |