[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / debug / pr47106.C
blob84c6e3f87be49d113e9c7a3f2748db14970960ca
1 // { dg-do compile }
2 // { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
3 // { dg-require-effective-target lto }
4 // { dg-xfail-if "" { powerpc-ibm-aix* } }
6 void end (int, int) __attribute__ ((__noreturn__));
8 struct S
10   int i;
11   S *s;
14 inline bool f (S *s)
16   if (!s->s)
17     end (0, 0);
18   return s->s == s;
21 inline bool
22 baz (S s1, S)
24   while (f (&s1));
26   return true;
29 inline bool
30 bar (S s1, S s2, S)
32   return baz (s1, s2);
35 S getS ();
37 bool
38 foo ()
40   return bar (getS (), getS (), getS ());