https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The ICE is on 1245 tree class_template = CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (tmpl)); (gdb) p tmpl $1 = <template_decl 0x7fffea81f280 operator()> where DECL_CONTEXT is <record_type 0x7fffea94ca80 __lambda0> on which CLASSTYPE_TEMPLATE_INFO is NULL. Note, there is another ICE, debug_tree (tmpl) ICEs on: #1 0x00000000009aa1d1 in dump_template_decl (pp=0x2f5fde0 <actual_pretty_printer>, t=<template_decl 0x7fffea81f280 operator()>, flags=128) at ../../gcc/cp/error.c:1396 1396 gcc_assert (TREE_CODE (TREE_TYPE (t)) == TEMPLATE_TEMPLATE_PARM); because TREE_TYPE (t) is a METHOD_TYPE rather than TEMPLATE_TEMPLATE_PARM.