blob: c5a97685eb57d02a60197e9f4dda7f6993cc0b81 [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-fno-pcc-struct-return" { target i?86-*-* x86_64-*-* } } */
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;
}