re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_17.f90
blob50d66c75a80973e157019f50a5baaad891010a95
1 ! { dg-do run }
2 ! { dg-options "-fcheck=bounds" }
3 ! { dg-shouldfail "above upper bound" }
5 ! PR fortran/29800
7 ! Contributed by Joost VandeVondele
10 TYPE data
11 INTEGER :: x(10)
12 END TYPE
13 TYPE data_areas
14 TYPE(data) :: y(10)
15 END TYPE
17 TYPE(data_areas) :: z(10)
19 integer, volatile :: i,j,k
20 i=1 ; j=1 ; k=11
22 z(i)%y(j)%x(k)=0
24 END
26 ! { dg-output "At line 22 of file .*bounds_check_17.f90.*Fortran runtime error: Index '11' of dimension 1 of array 'z%y%x' above upper bound of 10" }