OSDN Git Service

Pizza-lize :-)
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / pr42645-2.C
1 // PR tree-optimization/42645
2 // { dg-do compile }
3 // { dg-options "-fcompare-debug -O1" }
4
5 struct C
6 {
7   bool b;
8   C ();
9 };
10
11 static inline C *foo () {}
12
13 extern void f4 ();
14
15 static inline int
16 f3 ()
17 {
18   f4 ();
19 }
20
21 static inline void
22 f2 (bool b)
23 {
24   int tmp = f3 ();
25   if (C ().b && b)
26     C ();
27 }
28
29 void
30 f1 ()
31 {
32   C *c = foo ();
33   f2 (c->b);
34 }