diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 28e5e0d8c03..d28f8e6d5d7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-01-31 Tobias Burnus + + PR fortran/27588 + * gfortran.dg/char_bounds_check_fail_1.f90: Add test. + 2007-01-31 Tobias Burnus PR fortran/30520 diff --git a/gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 b/gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 new file mode 100644 index 00000000000..8afdae32486 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 @@ -0,0 +1,12 @@ +! { dg-do run } +! { dg-options "-fbounds-check" } +! { dg-shouldfail "Substring out of bounds check" } +! PR fortran/27588 +program bound_check + character*10 zz + i = 2 + j = i+9 + zz(i:j) = 'abcdef' + print * , zz + end +! { dg-output "Substring out of bounds: upper bound exceeds string length.*at line 9)}