Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / g++.old-deja / g++.jason / optimize.C
blob4676bef36c2dce8928f507316bca24787e05064e
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
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 }                               // { dg-bogus "" } jump_optimize
19 int g ()
21   A a;
22   return 1;
23 }                               // { dg-bogus "" } 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 }                               // { dg-bogus "" } jump_optimize