diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-08-13 18:49:02 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-08-13 18:49:02 +0000 |
commit | 20ac6454c53c50d218b54a7015668f7f9c10de8e (patch) | |
tree | fc21a5c07bc87bb9d03466c307a1496fbc31f3f0 /gcc | |
parent | 35ca2d4ea7495018ae7c378e10baaa6eb2dbd06f (diff) | |
download | gcc-20ac6454c53c50d218b54a7015668f7f9c10de8e.zip gcc-20ac6454c53c50d218b54a7015668f7f9c10de8e.tar.gz gcc-20ac6454c53c50d218b54a7015668f7f9c10de8e.tar.bz2 |
re PR fortran/90563 (Out of bounds error when compiling with -Wextra)
2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90563
* gfortran.dg/do_subsript_5.f90: Correct test.
From-SVN: r274396
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gfortran.dg/do_subscript_5.f90 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/testsuite/gfortran.dg/do_subscript_5.f90 b/gcc/testsuite/gfortran.dg/do_subscript_5.f90 index 29fefbc..54a4f1b 100644 --- a/gcc/testsuite/gfortran.dg/do_subscript_5.f90 +++ b/gcc/testsuite/gfortran.dg/do_subscript_5.f90 @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-additional-options "-Wdo-subscript" } ! PR 90563 - this used to be rejected, wrongly ! Original test case by Tobias Neumann program test @@ -9,9 +10,11 @@ program test p = 0.0 - do j=1,6 + ! The following warnings are actually bogus, but we are not yet + ! clever enough to suppress them. + do j=1,6 ! { dg-warning "out of bounds" } if (j<5) then - p(j) = p(swap(j)) + p(j) = p(swap(j)) ! { dg-warning "out of bounds" } endif enddo end program |