PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / nrv2.c
blobe4d1f9aba3a7b0ef928a8947c5af4a07a19168d8
1 /* Test that the tree_nrv pass works by making sure that we don't generate
2 a memcpy. Throw in a bit of control flow to make its job a bit harder. */
4 /* { dg-options "-O" } */
6 struct A { int i[100]; };
8 int b;
10 struct A f ()
12 struct A a;
13 if (b)
15 a.i[0] = 42;
16 return a;
18 else
20 a.i[42] = 1;
21 return a;
25 /* { dg-final { scan-assembler-not "memcpy" } } */