blob: 2ec597744695c5701e076d75174b5ae4de4ec7f7 [file] [log] [blame]
// PR optimization/6189
// Bug: we forgot about foo's nrv after writing it out.
// { dg-options -O3 }
// { dg-do run }
struct A
{
int i;
};
A foo ()
{
A a;
a.i = 42;
return a;
}
int main()
{
A b = foo();
return b.i != 42;
}