call.c (build_method_call): Call complete_type before checking for destructor.

* call.c (build_method_call): Call complete_type before checking
 	for destructor.
g++/13098 fix!!

From-SVN: r16438
This commit is contained in:
Benjamin Kosnik 1997-11-12 16:18:52 +00:00 committed by Benjamin Kosnik
parent 1f109f0fdb
commit 6d2b1beeac
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
* call.c (build_method_call): Call complete_type before checking
for destructor.
Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com) Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
* decl.c (add_block_current_level): Delete. * decl.c (add_block_current_level): Delete.

View File

@ -1812,7 +1812,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
return cp_convert (void_type_node, instance); return cp_convert (void_type_node, instance);
} }
if (! TYPE_HAS_DESTRUCTOR (basetype)) if (! TYPE_HAS_DESTRUCTOR (complete_type (basetype)))
return cp_convert (void_type_node, instance); return cp_convert (void_type_node, instance);
instance = default_conversion (instance); instance = default_conversion (instance);
instance_ptr = build_unary_op (ADDR_EXPR, instance, 0); instance_ptr = build_unary_op (ADDR_EXPR, instance, 0);