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