Commit 20ac6454 by Thomas Koenig

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
parent 35ca2d4e
! { dg-do compile } ! { dg-do compile }
! { dg-additional-options "-Wdo-subscript" }
! PR 90563 - this used to be rejected, wrongly ! PR 90563 - this used to be rejected, wrongly
! Original test case by Tobias Neumann ! Original test case by Tobias Neumann
program test program test
...@@ -9,9 +10,11 @@ program test ...@@ -9,9 +10,11 @@ program test
p = 0.0 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 if (j<5) then
p(j) = p(swap(j)) p(j) = p(swap(j)) ! { dg-warning "out of bounds" }
endif endif
enddo enddo
end program end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment