OSDN Git Service

362cc662a1a117b7a56a28a198427441147aac14
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / bounds_check_7.f90
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
10
11 program test
12   integer x(42)
13   call foo(x)
14 end program test
15 ! { dg-output "Array reference out of bounds .* lower bound of dimension 1 exceeded" }