Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr51895.C

raw
1 // PR middle-end/51895
2 // { dg-do compile }
3 // { dg-options "-O2" }
4
5 struct S
6 {
7 long a;
8 char b;
9 S () : a (0), b (0) {}
10 bool baz ();
11 };
12
13 __attribute__((noinline)) static bool
14 bar (S x, S y)
15 {
16 y = x;
17 return y.baz ();
18 }
19
20 bool
21 foo (S x)
22 {
23 S y;
24 return bar (x, y);
25 }