From 905ba62ec96f8469c1085861d9ceec58fbee5709 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 7 Jun 2020 10:43:54 +0200 Subject: [PATCH] Added test case for a PR which has been fixed in the meantime. gcc/testsuite/ChangeLog: PR tree-optimization/50439 * gfortran.dg/loop_interchange_2.f: New test. --- gcc/testsuite/gfortran.dg/loop_interchange_2.f | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/loop_interchange_2.f diff --git a/gcc/testsuite/gfortran.dg/loop_interchange_2.f b/gcc/testsuite/gfortran.dg/loop_interchange_2.f new file mode 100644 index 0000000..5869c29 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/loop_interchange_2.f @@ -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 -- 2.7.4