OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Revert XFAIL removal.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
static11.C
1
// Bug: g++ was failing to destroy C<int>::a because it was using two
2
// different sentry variables for construction and destruction.
3
4
extern "C" void _exit (int);
5
6
int r = 1;
7
8
struct A
9
{
10
void f(){};
11
A(){ ++r; }
12
~A(){ r -= 2; _exit (r); }
13
};
14
15
template<class T>
16
struct C
17
{
18
C(){ a.f(); }
19
static A a;
20
};
21
22
template <class T> A C<T>::a;
23
typedef C<int> B;
24
25
int main()
26
{
27
C<int> c;
28
return r;
29
}