* gfortran.dg/bounds_check_fail_1.f90: New test.
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Wed, 4 Oct 2006 15:44:32 +0000 (17:44 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 4 Oct 2006 15:44:32 +0000 (15:44 +0000)
From-SVN: r117431

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bounds_check_fail_1.f90 [new file with mode: 0644]

index d819ac34178f4f7e5460903838f0a9b60027a7a9..61168ffde1fefce2b0ba16e61fa2aba329259da2 100644 (file)
@@ -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 (file)
index 0000000..938d19a
--- /dev/null
@@ -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" }