Retro68/gcc/gcc/testsuite/gfortran.dg/bounds_check_fail_1.f90
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

8 lines
223 B
Fortran

! { dg-do run }
! { dg-options "-fbounds-check" }
! { dg-shouldfail "foo" }
integer x(1)
x(2) = x(1) ! { dg-warning "out of bounds" }
end
! { dg-output "Index '2' of dimension 1 of array 'x' above upper bound of 1" }