2008-05-25 Richard Guenther <rguenther@suse.de>
PR tree-optimization/17526
* gcc.dg/torture/pr17526.c: New testcase.
From-SVN: r135876
+2008-05-25 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/17526
+ * gcc.dg/torture/pr17526.c: New testcase.
+
2008-05-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-fno-pcc-struct-return" { target i?86-*-* } } */
+
+void abort(void);
+
+typedef struct { int i; } A;
+
+A __attribute__((noinline))
+foo(void)
+{
+ A a = { -1 };
+ return a;
+}
+
+void __attribute__((noinline))
+bar(A *p)
+{
+ *p = foo();
+}
+
+int main(void)
+{
+ A a;
+ bar(&a);
+ if (a.i != -1) abort();
+ return 0;
+}