https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100198
Bug ID: 100198
Summary: ICE: unexpected expression 'E' of kind
template_parm_index
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
12 Regression extremely related to fixed PR 100109.
template <int... E>
void f() {
([] { enum e { e = E }; }(), ...);
}
template void f<0>();
<source>:3:14: internal compiler error: unexpected expression 'E' of kind
template_parm_index
3 | ([] { enum e { e = E }; }(), ...);
| ^
0x1d02fc9 internal_error(char const*, ...)
???:0
0x7a6f3d build_enumerator(tree_node*, tree_node*, tree_node*, tree_node*,
unsigned int)
???:0
0x92c558 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
???:0
0x91843d tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0x9184e7 tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0x94ba12 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
???:0
0x932f5f tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
???:0
0x91e31f instantiate_decl(tree_node*, bool, bool)
???:0
0x96024b instantiate_pending_templates(int)
???:0
0x7cd029 c_parse_final_cleanups()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.