OSDN Git Service

* gcc.c-torture/compile/20020109-1.c: New test.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jan 2002 18:26:46 +0000 (18:26 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jan 2002 18:26:46 +0000 (18:26 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48685 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 443bfa0..356557c 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);
+}