https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122958
Egas Ribeiro <egas.g.ribeiro at tecnico dot ulisboa.pt> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egas.g.ribeiro at tecnico dot
ulis
| |boa.pt
--- Comment #6 from Egas Ribeiro <egas.g.ribeiro at tecnico dot ulisboa.pt> ---
i get the same exact backtrace as the test case if i use:
```
template <class T>
class Vec<T*>;
template <class T>
class Vec<T*> { };
```
/home/riogu/gcc-dev/source1/gcc/testsuite/g++.dg/cpp2a/redeclared-default.C:4:7:
error: ‘Vec’
is not a class template
4 | class Vec<T*>;
| ^~~
/home/riogu/gcc-dev/source1/gcc/testsuite/g++.dg/cpp2a/redeclared-default.C:7:15:
internal co
mpiler error: Segmentation fault
7 | class Vec<T*> { };
| ^
0x4cc9bea internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:787
0x1fb3dfe crash_signal
../../gcc/toplev.cc:325
0xf3fe61 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3759
0x12f9e3e process_partial_specialization
../../gcc/cp/pt.cc:5207
0x12ffc8d push_template_decl(tree_node*, bool)
../../gcc/cp/pt.cc:6078
...
note that even having a valid base class declaration will cause the same ICE:
```
template <class T>
class Vec;
template <class T>
class Vec<T*>;
template <class T>
class Vec<T*> { };
```
the issue is with redeclaring partial specializations in general.
> Yeah I found a few (and went through them confirming them and bisecting them
> as needed) > but I don't think they're the same bug. They just crash in the
> same function, for
> different reasons.
to me it seems like invalid default argument to the partial specialization isnt
the cause of the ICE (not sure if it would cause something else if the general
issue is solved).