diff mbox

[Committed] Add testcase that ICEs after loop splitting patch

Message ID CA+=Sn1md0PszNmVGuXZakcOZ+4W7e6R1t3O=Dxvyjx03jBWL_g@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski Aug. 3, 2016, 10:37 p.m. UTC
Hi,
  I committed a testcase that ICEs after applying "Gimple loop
splitting v2" patch to a GCC 6.  The IV and the bounds were two
different types which was causing the ICE to happen.

Thanks,
Andrew Pinski

ChangeLog:

* gcc.c-torture/compile/20160802-1.c: New testcase.
diff mbox

Patch

Index: testsuite/gcc.c-torture/compile/20160802-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20160802-1.c	(revision 0)
+++ testsuite/gcc.c-torture/compile/20160802-1.c	(revision 0)
@@ -0,0 +1,13 @@ 
+long g (long width, unsigned long byte) {
+  long r_hi = 0;
+  unsigned long r_lo = 0;
+  int s;
+  for (s = 0; s < width; s += 8)
+    {
+      int d = width - s - 8;
+      if (s < (8 * 8))
+        r_hi |= byte << (d - (8 * 8));
+    }
+  return r_lo + r_hi;
+}
+
Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog	(revision 239098)
+++ testsuite/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2016-08-03  Andrew Pinski  <apinski@cavium.com>
+
+	* gcc.c-torture/compile/20160802-1.c: New testcase.
+
 2016-08-03  Fritz Reese  <fritzoreese@gmail.com>
 
 	* gfortran.dg/dec_intrinsic_ints.f90: New testcase.