aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.fortran-torture
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-11-19 09:21:07 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-11-19 09:21:07 +0000
commit7906dbe42433518f7adef2ca388d7edc0a7fd246 (patch)
tree701e6a088cef351b4a7274c7c7aa0195f16be89a /gcc/testsuite/gfortran.fortran-torture
parent64856e1e0befcc1d2d1245efbe34b3e1b016a8f0 (diff)
downloadgcc-7906dbe42433518f7adef2ca388d7edc0a7fd246.zip
gcc-7906dbe42433518f7adef2ca388d7edc0a7fd246.tar.gz
gcc-7906dbe42433518f7adef2ca388d7edc0a7fd246.tar.bz2
re PR tree-optimization/57517 (internal compiler error: in eliminate_temp_copies, at tree-predcom.c:1913)
2013-11-19 Richard Biener <rguenther@suse.de> PR tree-optimization/57517 * tree-predcom.c (combinable_refs_p): Verify the combination is always executed when the refs are. * gfortran.fortran-torture/compile/pr57517.f90: New testcase. * gcc.dg/torture/pr57517.c: Likewise. From-SVN: r205010
Diffstat (limited to 'gcc/testsuite/gfortran.fortran-torture')
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90
new file mode 100644
index 0000000..f32698a
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90
@@ -0,0 +1,13 @@
+SUBROUTINE cal_helicity (uh, ph, phb, wavg, ims, ime, its, ite)
+ INTEGER, INTENT( IN ) :: ims, ime, its, ite
+ REAL, DIMENSION( ims:ime), INTENT( IN ) :: ph, phb, wavg
+ REAL, DIMENSION( ims:ime), INTENT( INOUT ) :: uh
+ INTEGER :: i
+ REAL :: zu
+ DO i = its, ite
+ zu = (ph(i ) + phb(i)) + (ph(i-1) + phb(i-1))
+ IF (wavg(i) .GT. 0) THEN
+ uh(i) = uh(i) + zu
+ ENDIF
+ END DO
+END SUBROUTINE cal_helicity