public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98163] New: ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.
@ 2020-12-06 14:31 leni536 at gmail dot com
  2020-12-07  4:13 ` [Bug c++/98163] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: leni536 at gmail dot com @ 2020-12-06 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-07 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 14:31 [Bug c++/98163] New: ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type leni536 at gmail dot com
2020-12-07  4:13 ` [Bug c++/98163] " mpolacek at gcc dot gnu.org
2020-12-07 10:23 ` marxin at gcc dot gnu.org
2020-12-07 10:26 ` marxin at gcc dot gnu.org
2020-12-07 21:22 ` leni536 at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).