Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / other / static11.C
blobe04cbc15438d20beb21950b05ea17e703834cde1
1 // This is a copy of g++.old-deja/g++.pt/static11.C which at one
2 // time got a SEGV for mmix-knuth-mmixware when compiled with
3 // -da (or either -dj or -df).
4 // { dg-do compile }
5 // { dg-options "-da" }
7 extern "C" void _exit (int);
9 int r = 1;
11 struct A
13   void f(){};
14   A(){ ++r; }
15   ~A(){ r -= 2; _exit (r); }
18 template<class T>
19 struct C
21   C(){ a.f(); }
22   static A a;
25 template <class T> A C<T>::a;
26 typedef C<int> B;
28 int main()
30   C<int> c;
31   return r;
34 // { dg-final { cleanup-rtl-dump "*" } }