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* } { "*" } { "" } }
5
6 void end (int, int) __attribute__ ((__noreturn__));
7
8 struct S
9 {
10 int i;
11 S *s;
12 };
13
f(S * s)14 inline bool f (S *s)
15 {
16 if (!s->s)
17 end (0, 0);
18 return s->s == s;
19 }
20
21 inline bool
baz(S s1,S)22 baz (S s1, S)
23 {
24 while (f (&s1));
25 }
26
27 inline bool
bar(S s1,S s2,S)28 bar (S s1, S s2, S)
29 {
30 baz (s1, s2);
31 }
32
33 S getS ();
34
35 bool
foo()36 foo ()
37 {
38 bar (getS (), getS (), getS ());
39 }
40