repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
dtor10.C
blob
81ed0c1ac89761c04aae72908360fceafaf104b4
1
// { dg-do run }
2
// Origin: Mark Mitchell <mark@codesourcery.com>
3
4
extern "C" void abort ();
5
6
int j;
7
8
struct S {
9
static S* s[5];
10
11
S () { s[j++] = this; }
12
S (const S&) { s[j++] = this; }
13
~S () {
14
for (int k = 0; k < j; ++k)
15
if (s[k] == this)
16
return;
17
abort ();
18
}
19
};
20
21
S* S::s[5];
22
23
struct T {
24
int i;
25
S s;
26
};
27
28
T t;
29
30
T f () {
31
return t;
32
}
33
34
void g (S) {
35
}
36
37
int main ()
38
{
39
g (f ().s);
40
}
41