Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr56310.C

raw
1 /* { dg-do compile { target c++11 } } */
2 /* { dg-options "-O -fipa-cp -fno-early-inlining -fipa-cp-clone --param=ipa-cp-eval-threshold=1" } */
3
4 void bar (void *, void *);
5
6 struct C
7 {
8 constexpr C ():p (0)
9 {
10 }
11 void *get ()
12 {
13 return p;
14 }
15 void *p;
16 };
17
18 struct B:C
19 {
20 };
21
22 struct A
23 {
24 void f (B * x, B * y)
25 {
26 bar (x->get (), y->get ());
27 }
28 };
29
30 void
31 foo ()
32 {
33 A a;
34 B b;
35 a.f (&b, &b);
36 }