OSDN Git Service

079f424536a52487881783318610f24a63ca6c38
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / debug / pr47106.C
1 // { dg-do compile }
2 // { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
3
4 void end (int, int) __attribute__ ((__noreturn__));
5
6 struct S
7 {
8   int i;
9   S *s;
10 };
11
12 inline bool f (S *s)
13 {
14   if (!s->s)
15     end (0, 0);
16   return s->s == s;
17 }
18
19 inline bool
20 baz (S s1, S)
21 {
22   while (f (&s1));
23 }
24
25 inline bool
26 bar (S s1, S s2, S)
27 {
28   baz (s1, s2);
29 }
30
31 S getS ();
32
33 bool
34 foo ()
35 {
36   bar (getS (), getS (), getS ());
37 }