PR c++/79500 - ICE with non-template deduction guide
[gcc.git] / gcc / cp / pt.c
index 9e6ce8d51def88cb54b50ba95f5714432956d90c..46e64986491552fec4b4531a43a3bf7b5cdacb83 100644 (file)
@@ -25118,7 +25118,7 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
     {
       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)
        {
@@ -25126,7 +25126,7 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
          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;