Added test case for a PR which has been fixed in the meantime.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 7 Jun 2020 08:43:54 +0000 (10:43 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 7 Jun 2020 08:45:10 +0000 (10:45 +0200)
gcc/testsuite/ChangeLog:

PR tree-optimization/50439
* gfortran.dg/loop_interchange_2.f: New test.

gcc/testsuite/gfortran.dg/loop_interchange_2.f [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/loop_interchange_2.f b/gcc/testsuite/gfortran.dg/loop_interchange_2.f
new file mode 100644 (file)
index 0000000..5869c29
--- /dev/null
@@ -0,0 +1,20 @@
+C { dg-do compile }
+C { dg-options "-std=legacy -O3 -floop-interchange" }
+C PR 50439 - this used to hang. Test case by Pat Haugen.
+
+      subroutine comnul
+C-----------------------------------------------------------------------
+      implicit real*8 (a-h,o-z)
+      parameter(zero=0.0d0,half=0.5d0,one=1.0d0)
+      common/secom/rtc(9,18,10,5),rts(9,18,10,5)
+      save
+C-----------------------------------------------------------------------
+      do 110 i1=1,9
+        do 110 i2=1,18
+          do 110 i3=1,10
+            do 110 i4=1,5
+              rtc(i1,i2,i3,i4)=zero
+              rts(i1,i2,i3,i4)=zero
+  110 continue
+      return
+      end