* pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
DECL_TEMPLATE_RESULT.
From-SVN: r245588
2017-02-19 Jason Merrill <jason@redhat.com>
+ PR c++/79500 - ICE with non-template deduction guide
+ * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
+ DECL_TEMPLATE_RESULT.
+
PR c++/79580 - ICE with compound literal
* parser.c (cp_parser_class_head): If we're in the middle of an
expression, use ts_within_enclosing_non_class.
{
tree t = cands;
for (; t; t = OVL_NEXT (t))
- if (DECL_NONCONVERTING_P (DECL_TEMPLATE_RESULT (OVL_CURRENT (t))))
+ if (DECL_NONCONVERTING_P (STRIP_TEMPLATE (OVL_CURRENT (t))))
break;
if (t)
{
for (t = cands; t; t = OVL_NEXT (t))
{
tree f = OVL_CURRENT (t);
- if (!DECL_NONCONVERTING_P (DECL_TEMPLATE_RESULT (f)))
+ if (!DECL_NONCONVERTING_P (STRIP_TEMPLATE (f)))
pruned = build_overload (f, pruned);
}
cands = pruned;
--- /dev/null
+// PR c++/79500
+// { dg-options -std=c++1z }
+
+template<typename T> struct A {};
+A(...) -> A<int>;
+A a = {};