https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123215
Bug ID: 123215
Summary: ICE with forward declared variable template partial
specializations
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: de34 at live dot cn
Target Milestone: ---
Since ver. 13, GCC crashes with the following program, while other compilers
correctly accept it. https://godbolt.org/z/97xerx6z5
In GCC 12 and earlier, GCC used to incorrectly reject it.
```
template<int, class = void>
extern int vt;
template<class T>
extern int vt<0, T>;
int fun() { return vt<0>; }
template<class T>
int vt<0, T> = 0;
int main() { return fun(); }
```