Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / ipa / pr56310.C
blob04f6aa6b6ea939fed041ab408378f9eb093236fa
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" } */
4 void bar (void *, void *);
6 struct C
8   constexpr C ():p (0)
9   {
10   }
11   void *get ()
12   {
13     return p;
14   }
15   void *p;
18 struct B:C
22 struct A
24   void f (B * x, B * y)
25   {
26     bar (x->get (), y->get ());
27   }
30 void
31 foo ()
33   A a;
34   B b;
35   a.f (&b, &b);