20000504-1.c: New test.
authorRichard Henderson <rth@cygnus.com>
Thu, 4 May 2000 23:27:15 +0000 (16:27 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 4 May 2000 23:27:15 +0000 (16:27 -0700)
        * gcc.c-torture/compile/20000504-1.c: New test.  Derived from
        OpenSSL by Jason R Thorpe.

From-SVN: r33691

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

index b43c8a3bcf5d66521baa5cac72f7322ebf44beed..07dadf5d64efda7eef83156227988f73227fc0e4 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-04  Richard Henderson  <rth@cygnus.com>
+
+       * gcc.c-torture/compile/20000504-1.c: New test.  Derived from
+       OpenSSL by Jason R Thorpe.
+
 2000-05-03  Robert Lipe <robertlipe@usa.net>
 
        * gcc.dg/20000503-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000504-1.c b/gcc/testsuite/gcc.c-torture/compile/20000504-1.c
new file mode 100644 (file)
index 0000000..1941bb3
--- /dev/null
@@ -0,0 +1,15 @@
+struct foo {
+       int a;
+       int b;
+};
+
+int func(struct foo *foo, int a)
+{
+       if (foo->b == 0) {
+               int ret = foo->a = a;
+               if (a >= 0)
+                       foo->a = a;
+               return (ret);
+       }
+       return (0);
+}