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
This commit is contained in:
parent
2acceeac67
commit
fb238648c4
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
27
gcc/testsuite/gcc.dg/torture/pr17526.c
Normal file
27
gcc/testsuite/gcc.dg/torture/pr17526.c
Normal file
@ -0,0 +1,27 @@
|
||||
/* { 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user