PR c++/79294
* pt.c (convert_nontype_argument_function): Adjust type even with a
value-dependent argument.
From-SVN: r246794
2017-04-07 Jason Merrill <jason@redhat.com>
+ PR c++/80356 - ICE with reference to function template argument.
+ PR c++/79294
+ * pt.c (convert_nontype_argument_function): Adjust type even with a
+ value-dependent argument.
+
PR c++/80267 - ICE with nested capture of reference
PR c++/60992
* pt.c (tsubst_copy): Handle lookup finding a capture proxy.
return error_mark_node;
if (value_dependent_expression_p (fn))
- return fn;
+ goto accept;
fn_no_ptr = strip_fnptr_conv (fn);
if (TREE_CODE (fn_no_ptr) == ADDR_EXPR)
return NULL_TREE;
}
+ accept:
if (TREE_CODE (type) == REFERENCE_TYPE)
fn = build_address (fn);
if (!same_type_ignoring_top_level_qualifiers_p (type, TREE_TYPE (fn)))
--- /dev/null
+// PR c++/80356
+
+template <int (&)(int, int)> struct a;
+template <int (&b)(int, int)> a<b> f();