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