]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.old-deja/g++.pt/static11.C
static11.C: Add xtensa-*-elf* to the list of targets to skip.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / static11.C
CommitLineData
401219a6
JM
1// Bug: g++ was failing to destroy C<int>::a because it was using two
2// different sentry variables for construction and destruction.
820ecf56
HPN
3//
4// Some targets (e.g. those with "set_board_info needs_status_wrapper 1"
5// in their dejagnu baseboard description) require that the status is
6// final when exit is entered (or main returns), and not "overruled" by a
7// destructor calling _exit. It's not really worth it to handle that.
9da754bd 8// Skip if target: mmix-knuth-mmixware xtensa-*-elf*
401219a6
JM
9
10extern "C" void _exit (int);
11
12int r = 1;
13
14struct A
15{
16 void f(){};
17 A(){ ++r; }
18 ~A(){ r -= 2; _exit (r); }
19};
20
21template<class T>
22struct C
23{
24 C(){ a.f(); }
25 static A a;
26};
27
28template <class T> A C<T>::a;
29typedef C<int> B;
30
31int main()
32{
33 C<int> c;
34 return r;
35}
This page took 0.624347 seconds and 5 git commands to generate.