]> gcc.gnu.org Git - gcc.git/commitdiff
* gcc.c-torture/compile/20040214-2.c: New test.
authorJosef Zlomek <zlomekj@suse.cz>
Sat, 14 Feb 2004 19:43:18 +0000 (20:43 +0100)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Sat, 14 Feb 2004 19:43:18 +0000 (19:43 +0000)
From-SVN: r77821

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

index b9613ad8cf547471441841be9c532385104ba92b..91484231857ae2f30cc267f72de13c6a9703ef60 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-14  Josef Zlomek  <zlomekj@suse.cz>
+
+       * gcc.c-torture/compile/20040214-2.c: New test.
+
 2004-02-14  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR c++/14116
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040214-2.c b/gcc/testsuite/gcc.c-torture/compile/20040214-2.c
new file mode 100644 (file)
index 0000000..352d5a5
--- /dev/null
@@ -0,0 +1,57 @@
+/* http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01307.html */
+
+typedef struct xdef xdef;
+struct xdef
+{
+  char xtyp;
+  xdef *next;
+  int y;
+};
+
+extern void b ();
+extern void *foo (void *bar);
+extern void *foo2 (void *bar1, void *bar2);
+extern void *qwe;
+
+static void
+c (xdef * xp)
+{
+  b (xp);
+}
+static void
+a (xdef ** xpp)
+{
+  xdef *xp;
+  xp = *xpp;
+
+  foo (xp);
+  xp = foo2 (xp, qwe);
+  b (xp->next);
+  foo (xp);
+  if (xp->y)
+  {
+    foo (xp);
+    if (xp)
+    {
+      xdef *p = foo2 (xp, qwe);
+      foo2 (xp, p);
+      xp = foo (p);
+    }
+    else
+    {
+      foo2 (foo(*xpp), *xpp);
+    }
+  }
+  *xpp = foo2 (xpp, qwe);
+}
+
+void
+b (xdef ** xpp)
+{
+  xdef *xp = *xpp;
+  if (!xp)
+    return;
+  if (xp->xtyp == 0)
+    a (xpp);
+  c (xp);
+}
This page took 0.096283 seconds and 5 git commands to generate.