From: burnus Date: Wed, 31 Jan 2007 10:23:53 +0000 (+0000) Subject: (This part was missing in the r118852 / Wed Nov 15 10:13:16 2006 check in) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=436c0a007524fcf3e7981b304688c01e1b58ec9e;p=thirdparty%2Fgcc.git (This part was missing in the r118852 / Wed Nov 15 10:13:16 2006 check in) 2007-01-31 Tobias Burnus PR fortran/27588 * gfortran.dg/char_bounds_check_fail_1.f90: Add test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121401 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 28e5e0d8c033..d28f8e6d5d77 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 000000000000..8afdae324864 --- /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)}