public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix pr70043.f90 testcase (PR testsuite/82093)
@ 2017-09-04  7:53 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2017-09-04  7:53 UTC (permalink / raw)
  To: gcc-patches

Hi!

This testcase contains an out-of-bound access, which isn't necessary for the
thing the testcase tests.  I've verified that both the original and patched
testcase hangs r233928 and succeeds with r233934 and committed to trunk
as obvious.

2017-09-04  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/70043
	PR testsuite/82093
	* gfortran.dg/vect/pr70043.f90 (fn1): Start loop from 1 instead of 0.

--- gcc/testsuite/gfortran.dg/vect/pr70043.f90.jj	2016-03-03 15:28:39.000000000 +0100
+++ gcc/testsuite/gfortran.dg/vect/pr70043.f90	2017-09-04 09:49:20.261236667 +0200
@@ -1,4 +1,5 @@
-! { dg-do compile  }
+! PR tree-optimization/70043
+! { dg-do compile }
 ! { dg-additional-options "-Ofast -g" }
 ! { dg-additional-options "-march=haswell" { target i?86-*-* x86_64-*-* } }
 
@@ -6,7 +7,7 @@ subroutine fn1(a, b)
   real(8), intent(in) ::  b(100)
   real(8), intent(inout) :: a(100)
   real(8) c
-  do i=0,100
+  do i=1,100
      if( a(i) < 0.0 ) then
         c =  a(i) * b(i)
         a(i) = a(i) - c / b(i)

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-04  7:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-04  7:53 [committed] Fix pr70043.f90 testcase (PR testsuite/82093) Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).