20160802-1.c: New testcase.
authorAndrew Pinski <apinski@cavium.com>
Wed, 3 Aug 2016 22:37:53 +0000 (22:37 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 3 Aug 2016 22:37:53 +0000 (15:37 -0700)
2016-08-03  Andrew Pinski  <apinski@cavium.com>

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

From-SVN: r239099

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20160802-1.c [new file with mode: 0644]

index cafdb6d29e53c70278da86360f1f4cfba9611f55..e7911239d55da7ef20d7f0bde87516ffdf42046d 100644 (file)
@@ -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.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20160802-1.c b/gcc/testsuite/gcc.c-torture/compile/20160802-1.c
new file mode 100644 (file)
index 0000000..f7a83dc
--- /dev/null
@@ -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;
+}
+