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
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
dtor5.C
blob
fc1ef385d9cd2bb4a9cf3ee9bf3b828b84549503
1
// { dg-do run }
2
// Origin: Mark Mitchell <mark@codesourcery.com>
3
4
extern "C" void abort ();
5
6
struct B;
7
8
struct S
9
{
10
S (B*);
11
~S ();
12
13
B* b_;
14
};
15
16
struct B
17
{
18
B () : s (this) { }
19
20
virtual void f () { }
21
22
S s;
23
};
24
25
S::S (B* b) : b_ (b) { }
26
27
S::~S () { b_->f (); }
28
29
struct D : public B
30
{
31
virtual void f () { abort (); }
32
};
33
34
int main ()
35
{
36
D d;
37
}