2011-04-07 Jason Merrill <jason@redhat.com>
+ PR c++/48481
+ * call.c (build_user_type_conversion_1): Use lookup_fnfields_slot.
+ Release unused vector.
+
PR c++/48451
* pt.c (fn_type_unification): Don't clear incomplete pack flag.
(type_unification_real): Clear it here instead.
|| !DERIVED_FROM_P (totype, fromtype));
if (MAYBE_CLASS_TYPE_P (totype))
- ctors = lookup_fnfields (totype, complete_ctor_identifier, 0);
+ /* Use lookup_fnfields_slot instead of lookup_fnfields to avoid
+ creating a garbage BASELINK; constructors can't be inherited. */
+ ctors = lookup_fnfields_slot (totype, complete_ctor_identifier);
if (MAYBE_CLASS_TYPE_P (fromtype))
{
if (ctors)
{
int ctorflags = flags;
- ctors = BASELINK_FUNCTIONS (ctors);
first_arg = build_int_cst (build_pointer_type (totype), 0);
candidates = splice_viable (candidates, pedantic, &any_viable_p);
if (!any_viable_p)
- return NULL;
+ {
+ if (args)
+ release_tree_vector (args);
+ return NULL;
+ }
cand = tourney (candidates);
if (cand == 0)