https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123670
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
#c2 can be fixed by
+++ b/gcc/cp/pt.cc
@@ -11122,6 +11122,8 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees,
void *d)
case VAR_DECL:
if (DECL_LANG_SPECIFIC (t) && DECL_TEMPLATE_INFO (t))
WALK_SUBTREE (DECL_TI_ARGS (t));
+ if (DECL_CONTEXT (t) && pfd->include_nondeduced_p)
+ WALK_SUBTREE (DECL_CONTEXT (t));
break;
case PARM_DECL:
which fixes the original crash too, but that test should be accepted; with this
patch it errors.
Along with bug 127799, there are probably 3 different issues.