decl.c (finish_destructor_body): Use the base destructor when destroying virtual bases.

* decl.c (finish_destructor_body): Use the base destructor when
	destroying virtual bases.

From-SVN: r33562
This commit is contained in:
Scott Snyder 2000-05-01 06:01:33 +00:00 committed by Mark Mitchell
parent 738e281059
commit 5724a0e641
3 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-04-30 Scott Snyder <snyder@fnal.gov>
* decl.c (finish_destructor_body): Use the base destructor when
destroying virtual bases.
2000-04-30 Mark Mitchell <mark@codesourcery.com>
* expr.c (cplus_expand_expr): Preserve temporaries when expanding

View File

@ -13875,7 +13875,7 @@ finish_destructor_body ()
TYPE_BINFO (current_class_type));
finish_expr_stmt
(build_scoped_method_call
(current_class_ref, vb, complete_dtor_identifier,
(current_class_ref, vb, base_dtor_identifier,
NULL_TREE));
}
vbases = TREE_CHAIN (vbases);

View File

@ -0,0 +1,23 @@
int i;
struct CC
{
virtual ~CC () { ++i; }
};
class BB : virtual public CC
{
};
class AA : public virtual BB
{
};
int main ()
{
{
AA xx;
}
if (i != 1)
return 1;
}