PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_7.f90
blobb38419908bbd429e77854788e33ac78d93794b32
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Array reference out of bounds" }
4 ! PR fortran/31627
5 subroutine foo(a)
6 integer a(*), i
7 i = 0
8 a(i) = 42
9 end subroutine foo
11 program test
12 integer x(42)
13 call foo(x)
14 end program test
15 ! { dg-output "Index '0' of dimension 1 of array 'a' below lower bound of 1" }