2017-03-10 Jakub Jelinek <jakub@redhat.com>
+ PR c++/79899
+ * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
+ Use XALLOCAVEC macro.
+
PR c++/79896
* decl.c (finish_enum_value_list): If value is error_mark_node,
don't copy it and change its type.
populate_clone_array (fn, fns);
/* Don't use thunks if the base clone omits inherited parameters. */
- if (ctor_omit_inherited_parms (fns[0]))
+ if (fns[0] && ctor_omit_inherited_parms (fns[0]))
return 0;
DECL_ABSTRACT_P (fn) = false;
if (length > max_parms)
max_parms = length;
}
- args = (tree *) alloca (max_parms * sizeof (tree));
+ args = XALLOCAVEC (tree, max_parms);
/* We know that any clones immediately follow FN in TYPE_METHODS. */
FOR_EACH_CLONE (clone, fn)