2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / nrv3.C
blob2ec597744695c5701e076d75174b5ae4de4ec7f7
1 // PR optimization/6189
2 // Bug: we forgot about foo's nrv after writing it out.
3 // { dg-options -O3 }
4 // { dg-do run }
6 struct A
8   int i;
9 };
12 A foo ()
14   A a;
15   a.i = 42;
16   return a;
20 int main()
22   A b = foo();
23   return b.i != 42;