https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120134
Bug ID: 120134
Summary: internal compiler error: in coerce_template_parms, at
cp/pt.cc:9488
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ldalessandro at gmail dot com
Target Milestone: ---
Created attachment 61338
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61338&action=edit
reduced test case
Encountered this ICE while trying to cvise a different ICE.
template <int> struct A;
template <A> int B;
B < {
Compile with -std=gnu++20.
<source>:3:5: internal compiler error: in coerce_template_parms, at
cp/pt.cc:9488
3 | B < {
| ^
0x293a4f5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2951766 internal_error(char const*, ...)
???:0
0xad7334 fancy_abort(char const*, int, char const*)
???:0
0xd1f83b lookup_template_variable(tree_node*, tree_node*, int)
???:0
0xcfb063 c_parse_file()
???:0
0xe5db29 c_common_parse_file()
???:0
Live: https://godbolt.org/z/9sasMYKbc [May 6th, 2025]