* gcc.c-torture/compile/pr85401: New test.
authorMaya Rashish <coypu@sdf.org>
Mon, 14 Oct 2019 21:14:16 +0000 (21:14 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 14 Oct 2019 21:14:16 +0000 (15:14 -0600)
From-SVN: r276971

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

index 08d4a79867d5c48fef7f8a1aaa8774b40edf86ee..494c67f9b19faaf1d6b96840551cb707c617083a 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-14  Maya Rashish  <coypu@sdf.org>
+
+       * gcc.c-torture/compile/pr85401: New test.
+
 2019-10-14  Mihailo Stojanovic  <mistojanovic@wavecomp.com>
 
        * gcc.target/mips/constant-spill.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr85401.c b/gcc/testsuite/gcc.c-torture/compile/pr85401.c
new file mode 100644 (file)
index 0000000..fa8fa19
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int h (void);
+int i (int);
+
+struct a b;
+struct a
+{
+  unsigned c:4;
+} d ()
+{
+  int e, f = b.c << 2, g = h ();
+  for (; g;)
+    ;
+  if (e == 0)
+    if (f)
+      i (f);
+  return b;
+}