summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-01-25 20:43:21 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-01-25 15:43:21 -0500
commita6ecf8b60582b7d7ca7f9c24730db831aea6658e (patch)
treeb11f811fefe6e6f105d75041651ace7a6676fc36 /gcc/cp/call.c
parent89ae2c8c42affa24d6630e80558841968eb8f2b9 (diff)
downloadgcc-a6ecf8b60582b7d7ca7f9c24730db831aea6658e.tar.gz
class.c (resolve_address_of_overloaded_function): Mark the chosen function used.
* class.c (resolve_address_of_overloaded_function): Mark the chosen function used. * call.c (build_call): Make sure that a function coming in has been marked used already. * decl.c (expand_static_init): Call mark_used instead of assemble_external. * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec, alloc_eh_object, expand_throw): Likewise. * init.c (build_builtin_delete_call): Likewise. * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1, expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise. From-SVN: r24862
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 3891ea75b7e..c478a500140 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1,5 +1,5 @@
/* Functions related to invoking methods and overloaded functions.
- Copyright (C) 1987, 92-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92-97, 1998, 1999 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and
modified by Brendan Kehoe (brendan@cygnus.com).
@@ -552,6 +552,9 @@ build_call (function, result_type, parms)
if (decl && DECL_CONSTRUCTOR_P (decl))
is_constructor = 1;
+ if (decl)
+ my_friendly_assert (TREE_USED (decl), 990125);
+
/* Don't pass empty class objects by value. This is useful
for tags in STL, which are used to control overload resolution.
We don't need to handle other cases of copying empty classes. */