1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* PR opt/14288 */ /* { dg-do compile } */ /* { dg-options "-O -Wall" } */ volatile int sink; extern int foo(int); struct S { int x; S() { x = foo(0); } ~S() { sink = x; } }; int test(bool p) { return p ? foo(S().x) : 0; /* { dg-bogus "uninitialized" } */ }