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 
6 struct A {
7   A();
8   A(const A&);
9   A& operator= (const A&);
10   ~A();
11 };
12 
f()13 int f ()
14 {
15   A a[2];
16   return 1;
17 }				// { dg-bogus "" } jump_optimize
18 
g()19 int g ()
20 {
21   A a;
22   return 1;
23 }				// { dg-bogus "" } jump_optimize
24 
25 struct B {
26   B();
27   B(const B&);
28   B& operator= (const B&);
29   ~B();
30 };
31 
~B()32 inline B::~B()
33 {
34   int i = 2;
35   while (i--) ;
36 }
37 
h()38 int h ()
39 {
40   B b;
41   return 1;
42 }				// { dg-bogus "" } jump_optimize
43