PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / nrv12.C
blobe5f4db440ad486c6665beef67398b97afbb41f75
1 /* Verify that gimple-level NRV is occurring even for RESULT_DECLs.  */
2 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3 /* { dg-options "-O -fdump-tree-optimized" } */
5 struct P
7   long long l;
8   int a;
9   unsigned int b;
10   P(long long x) : l(x) {}
13 P foo (P);
14 P bar (P);
16 P foo (P x)
18   P y = P (-1LL);
19   y = bar (x);
20   return y;
23 /* { dg-final { scan-tree-dump-times "return slot optimization" 1 "optimized" } } */