https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100055
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Summary|ICE on invalid requires |[10/11/12 Regression] ICE |expression |on invalid requires | |expression Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Priority|P3 |P4 Target Milestone|--- |10.4 --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- This is probably sufficient: --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9695,7 +9695,7 @@ grokfndecl (tree ctype, bool memtmpl = (!block_local && (processing_template_decl > template_class_depth (ctx))); - if (memtmpl) + if (memtmpl && current_template_parms) tmpl_reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); tree ci = build_constraints (tmpl_reqs, decl_reqs); if (concept_p && ci)