FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / optimize.C
blob1f554e219359d1897e88f7b897df089843b63f4e
1 // Bug: g++ claims that control can fall off the end of these functions.
2 // PRMS Id: 4943
3 // Special g++ Options: -O -pedantic-errors
4 // Build don't link:
6 struct A {
7   A();
8   A(const A&);
9   A& operator= (const A&);
10   ~A();
13 int f ()
15   A a[2];
16   return 1;
17 }                               // gets bogus error - jump_optimize
19 int g ()
21   A a;
22   return 1;
23 }                               // gets bogus error - jump_optimize
25 struct B {
26   B();
27   B(const B&);
28   B& operator= (const B&);
29   ~B();
32 inline B::~B()
34   int i = 2;
35   while (i--) ;
38 int h ()
40   B b;
41   return 1;
42 }                               // gets bogus error - jump_optimize