* config/bfin/bfin.c (effective_address_32bit_p): Return true for
[official-gcc/alias-decl.git] / gcc / testsuite / g++.dg / opt / nrv2.C
blob4ffc075878d3671de5c2672a88517093c62f9053
1 // Test for the named return value optimization, this time with inlining.
2 // { dg-do run }
3 // { dg-options -O2 }
5 int c;
6 int d;
8 struct A
10   A() { ++c; }
11   A(const A&) { ++c; };
12   ~A() { ++d; }
15 inline A f ()
17   A a;
18   return a;
21 int main ()
23   {
24     A a = f ();
25   }
27   return !(c == 1 && c == d);