Debian Codegraph @

gcc/testsuite/g++.dg/other/pr42645-2.C

raw
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 () { return 0; }
12
13 extern void f4 ();
14
15 static inline int
16 f3 ()
17 {
18 f4 ();
19 return 0;
20 }
21
22 static inline void
23 f2 (bool b)
24 {
25 int tmp = f3 ();
26 if (C ().b && b)
27 C ();
28 }
29
30 void
31 f1 ()
32 {
33 C *c = foo ();
34 f2 (c->b);
35 }