From 20ac6454c53c50d218b54a7015668f7f9c10de8e Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Tue, 13 Aug 2019 18:49:02 +0000 Subject: [PATCH] re PR fortran/90563 (Out of bounds error when compiling with -Wextra) 2013-08-13 Thomas Koenig PR fortran/90563 * gfortran.dg/do_subsript_5.f90: Correct test. From-SVN: r274396 --- gcc/testsuite/gfortran.dg/do_subscript_5.f90 | 7 +++++-- 1 file 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 29fefbcb6f2..54a4f1ba51a 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 -- 2.30.2