Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / loop1.C
blob168734c545b0bf1f288fd465cb44c2e9f40180d9
1 // { dg-do run  }
2 // { dg-options "-O2" }
3 // Test for bad loop optimization of goto fixups.
5 typedef bool (*ftype) ();
7 int c, d;
8 struct A {
9   A() { ++c; }
10   A(const A&) { ++c; }
11   ~A() { ++d; }
14 void f (ftype func)
16   A a;
17   do {
18     if ((*func)()) return;
19   } while (true);
22 bool test ()
24   return true;
27 main ()
29   f (test);
30   return (c != d);