+2017-02-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/79294 - ICE with invalid template argument
+ * pt.c (convert_nontype_argument_function): Check value-dependence.
+ (convert_nontype_argument): Don't check it here for function ptrs.
+
2017-02-02 Richard Biener <rguenther@suse.de>
PR cp/14179
if (fn == error_mark_node)
return error_mark_node;
+ if (value_dependent_expression_p (fn))
+ return fn;
+
fn_no_ptr = strip_fnptr_conv (fn);
if (TREE_CODE (fn_no_ptr) == ADDR_EXPR)
fn_no_ptr = TREE_OPERAND (fn_no_ptr, 0);
/* Null pointer values are OK in C++11. */
return perform_qualification_conversions (type, expr);
- if (!value_dependent_expression_p (expr))
- expr = convert_nontype_argument_function (type, expr, complain);
+ expr = convert_nontype_argument_function (type, expr, complain);
if (!expr || expr == error_mark_node)
return expr;
}
return NULL_TREE;
}
- if (!value_dependent_expression_p (expr))
- expr = convert_nontype_argument_function (type, expr, complain);
+ expr = convert_nontype_argument_function (type, expr, complain);
if (!expr || expr == error_mark_node)
return expr;
}