https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163
Bug ID: 98163 Summary: ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type. Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- g++ (Compiler-Explorer-Build) 11.0.0 20201205 (experimental) command line flags: -std=c++17 -pedantic-errors ``` template <auto& ref> struct S {}; template <typename T> void foo(T) {} extern const int arr[]; // arr is const int[] void bar(S<arr> s) { foo(s); } const int arr[2] = {1,2}; // arr is const int[2] void baz(S<arr> s) { foo(s); } ``` source>:19:1: error: Two symbols with same comdat_group are not linked by the same_comdat_group list. 19 | } | ^ _Z3fooI1SIL_Z3arrEEEvT_/4 (void foo(T) [with T = S<arr>]) @0x7f7216d81330 Type: function definition analyzed Visibility: no_reorder public weak comdat comdat_group:_Z3fooI1SIL_Z3arrEEEvT_ one_only previous sharing asm name: 3 References: Referring: Function flags: body Called by: _Z3baz1SIL_Z3arrEE/2 Calls: _Z3fooI1SIL_Z3arrEEEvT_/3 (void foo(T) [with T = S<arr>]) @0x7f7216d81220 Type: function definition analyzed Visibility: no_reorder public weak comdat comdat_group:_Z3fooI1SIL_Z3arrEEEvT_ one_only next sharing asm name: 4 References: Referring: Function flags: body Called by: _Z3bar1SIL_Z3arrEE/0 Calls: <source>:19:1: internal compiler error: symtab_node::verify failed 0x1c39f09 internal_error(char const*, ...) ???:0 0xacca22 symtab_node::verify_symtab_nodes() ???:0 0xae8def symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 godbolt: https://godbolt.org/z/bKc1c1