* gcc.c-torture/compile/20000504-1.c: New test. Derived from
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 May 2000 23:27:15 +0000 (23:27 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 May 2000 23:27:15 +0000 (23:27 +0000)
        OpenSSL by Jason R Thorpe.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33691 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b43c8a3..07dadf5 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);
+}