]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR tree-optimization/71109 (gcc ICE at -O3 on valid code on x86_64-linux...
authorJakub Jelinek <jakub@redhat.com>
Fri, 30 Aug 2019 11:16:10 +0000 (13:16 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 30 Aug 2019 11:16:10 +0000 (13:16 +0200)
Backported from mainline
2018-12-03  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/71109
* gcc.c-torture/compile/pr71109.c: New test.

From-SVN: r275073

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

index 66ee296238b48f51dc5a2f06ec66625dd67f32a5..b6520ca6fa4ce2a5c505f824a6ef2a9e30d64eb8 100644 (file)
@@ -1,6 +1,11 @@
 2019-08-30  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-12-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/71109
+       * gcc.c-torture/compile/pr71109.c: New test.
+
        2018-11-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/85550
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr71109.c b/gcc/testsuite/gcc.c-torture/compile/pr71109.c
new file mode 100644 (file)
index 0000000..f86ba60
--- /dev/null
@@ -0,0 +1,31 @@
+/* PR tree-optimization/71109 */
+
+struct S { int g, h; signed char i; int j; signed char k; int l[4]; } a, c;
+struct T { signed char g; } e;
+int *b, d;
+static void foo ();
+
+void
+bar (void)
+{
+  while (d)
+    {
+      int k;
+      struct T f[3];
+      foo (bar, a);
+      for (k = 0;; k++)
+       f[k] = e;
+    }
+}
+
+static inline void
+foo (int x, struct S y, struct T z)
+{
+  for (z.g = 2; z.g; z.g--)
+    {
+      c = a = y;
+      *b |= 6;
+      if (y.g)
+       break;
+    }
+}