1// { dg-do assemble } 2// { dg-options "-O -pedantic-errors" } 3// Bug: g++ claims that control can fall off the end of these functions. 4// PRMS Id: 4943 5 6struct A { 7 A(); 8 A(const A&); 9 A& operator= (const A&); 10 ~A(); 11}; 12 13int f () 14{ 15 A a[2]; 16 return 1; 17} // { dg-bogus "" } jump_optimize 18 19int g () 20{ 21 A a; 22 return 1; 23} // { dg-bogus "" } jump_optimize 24 25struct B { 26 B(); 27 B(const B&); 28 B& operator= (const B&); 29 ~B(); 30}; 31 32inline B::~B() 33{ 34 int i = 2; 35 while (i--) ; 36} 37 38int h () 39{ 40 B b; 41 return 1; 42} // { dg-bogus "" } jump_optimize 43