summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dec_structure_23.f90
blob: 3c68489c4bdb5b7272720c2910a20882d7033f3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-options "-fdec-structure" }
!
! PR fortran/78240
!
! Test a regression where an ICE occurred attempting to create array variables
! with non-constant array-specs in legacy clist initializers.
!

program p
  implicit none
  integer :: nn
  real :: rr
  structure /s/
    integer x(n)    /1/   ! { dg-error "xpected constant" }
    integer xx(nn)  /1/   ! { dg-error "xpected constant" }
    integer xxx(rr) /1.0/ ! { dg-error "xpected constant" }
  end structure
end