[Bug c++/98163] ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-07 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163

--- Comment #4 from Lénárd Szolnoki  ---
Other example in the same spirit, but not using array of unknown bound:

```
template 
struct S {};

template 
void foo(T) {}

int i;
constexpr const int& iref = i;

template void foo(S);
template void foo(S);
```

[Bug c++/98163] ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163

--- Comment #3 from Martin Liška  ---
and without the checking one gets an assembler error:

$ g++ pr98163.C -c -std=c++17 -pedantic-errors
/tmp/cclBTXg2.s: Assembler messages:
/tmp/cclBTXg2.s:70: Error: symbol `_Z3fooI1SIL_Z3arrEEEvT_' is already defined

so the checking really makes sense.

[Bug c++/98163] ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163

Martin Liška  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2020-12-07
 Status|UNCONFIRMED |NEW

--- Comment #2 from Martin Liška  ---
This one started with r7-4431-g4a826ca6feb3c7ec, it was rejected before that:

pr98163.C:1:17: error: ‘auto’ parameter not permitted in this context
 template 
 ^~~
pr98163.C:10:15: note: invalid template non-type parameter
 void bar(S s) {
   ^
pr98163.C:17:15: note: invalid template non-type parameter
 void baz(S s) {
   ^

[Bug c++/98163] ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
Probably a dup of bug 91241.