Commit fb238648 by Richard Guenther Committed by Richard Biener

re PR middle-end/17526 (libcpp is miscompiled with -fno-pcc-struct-return -O2)

2008-05-25  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/17526
	* gcc.dg/torture/pr17526.c: New testcase.

From-SVN: r135876
parent 2acceeac
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> 2008-05-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE. * gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE.
......
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment