aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2006-10-04 17:44:32 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-10-04 15:44:32 +0000
commit2e38371e01e1944f79f4cdec3ead6fae8d31950d (patch)
tree50a9c532b5d9a02366d8659286199ed37c3d17f6 /gcc
parent1576e2be3313a3639d56dc35e311b13b9f1a25b2 (diff)
downloadgcc-2e38371e01e1944f79f4cdec3ead6fae8d31950d.zip
gcc-2e38371e01e1944f79f4cdec3ead6fae8d31950d.tar.gz
gcc-2e38371e01e1944f79f4cdec3ead6fae8d31950d.tar.bz2
* gfortran.dg/bounds_check_fail_1.f90: New test.
From-SVN: r117431
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_fail_1.f907
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d819ac3..61168ffd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.dg/bounds_check_fail_1.f90: New test.
+
2006-10-03 Mark Mitchell <mark@codesourcery.com>
PR c++/29020
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_fail_1.f90 b/gcc/testsuite/gfortran.dg/bounds_check_fail_1.f90
new file mode 100644
index 0000000..938d19a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bounds_check_fail_1.f90
@@ -0,0 +1,7 @@
+! { 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 "out of bounds for array 'x', upper bound of dimension 1 exceeded.*at line 5" }