* gcc.c-torture/compile/20020109-1.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Wed, 9 Jan 2002 18:26:46 +0000 (19:26 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 9 Jan 2002 18:26:46 +0000 (19:26 +0100)
From-SVN: r48685

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

index 443bfa0f7caedd6891d94176f85126feae314a61..356557cdb292f89831a91dfdd0947044ffd24ee0 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.c-torture/compile/20020109-1.c: New test.
+
 2002-01-08  Kazu Hirata  <kazu@hxi.com>
 
        * gcc.c-torture/execute/20020108-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020109-1.c b/gcc/testsuite/gcc.c-torture/compile/20020109-1.c
new file mode 100644 (file)
index 0000000..532fe6d
--- /dev/null
@@ -0,0 +1,23 @@
+/* This testcase ICEd when 2 different successors of a basic block
+   were successfully threaded and try_forward_edges was not expecting
+   that.  */
+
+typedef struct A
+{
+  struct A *s, *t;
+  unsigned int u;
+} A;
+
+void bar (A *);
+
+void
+foo (A *x, A *y, A *z)
+{
+  while (y
+        && (((y && y->t && y->t->u) ? y : z)->t
+            == ((x && x->t && x->t->u) ? x : z)->t))
+    y = y->s;
+
+  if (y)
+    bar (y);
+}