Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / init9.C
blob6780b5a973ead456d4f6bb727d5705167389446c
1 // { dg-do assemble  }
3 // Based on a testcase submitted by Tudor Hulubei <tudor@cs.unh.edu>
5 // X is not a POD because it has a user-defined destructor.
6 // Therefore, we can't cross its initialization.
8 // vector<int> is not even an aggregate; nevertheless, no error is
9 // reported...
11 struct A {
12   A() {}
15 void a() {
16   goto bar; // { dg-error "" } jump from here
17   A x; // { dg-error "" } jump crosses initialization
18  bar: // { dg-error "" } jump to here
19   ;
22 struct X {
23   ~X() {}
26 void b() {
27   goto bar; // { dg-error "" } jump from here
28   X x; // { dg-error "" } jump crosses initialization
29  bar: // { dg-error "" } jump to here
30   ;
33 #include <vector>
35 void c() {
36   goto bar; // { dg-error "" } jump from here
37   std::vector<int> x; // { dg-error "" } jump crosses initialization
38  bar: // { dg-error "" } jump to here
39   ;