2017-12-06 Jason Merrill <jason@redhat.com>
+ * call.c (convert_for_arg_passing): Pass NULL_TREE to
+ targetm.calls.promote_prototypes.
+ (type_passed_as): Likewise.
+
PR c++/82115 - ICE with variable initialized with its own address.
* pt.c (value_dependent_expression_p): Add lval parameter. Don't
consider DECL_INITIAL if it's true.
/* There are no other pointers to this temporary. */
type = cp_build_qualified_type (type, TYPE_QUAL_RESTRICT);
}
- else if (targetm.calls.promote_prototypes (type)
+ else if (targetm.calls.promote_prototypes (NULL_TREE)
&& INTEGRAL_TYPE_P (type)
&& COMPLETE_TYPE_P (type)
&& tree_int_cst_lt (TYPE_SIZE (type), TYPE_SIZE (integer_type_node)))
/* Pass classes with copy ctors by invisible reference. */
else if (TREE_ADDRESSABLE (type))
val = build1 (ADDR_EXPR, build_reference_type (type), val);
- else if (targetm.calls.promote_prototypes (type)
+ else if (targetm.calls.promote_prototypes (NULL_TREE)
&& INTEGRAL_TYPE_P (type)
&& COMPLETE_TYPE_P (type)
&& tree_int_cst_lt (TYPE_SIZE (type), TYPE_SIZE (integer_type_node)))