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