[Bug c++/69903] Function template specialization with CRTP-class causes compiler segfault
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 25 18:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69903
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Smaller test case:
struct A {
template <int i>
static void f() { };
};
struct B : A { };
template<>
void B::f<0>() { };
int main() {
B::f<0> ();
}
If f is made non-static then the compiler rejects the specialization and
there's no ICE.
And if "void B::f<0>" is replaced with "void A::f<0>" then the code is accepted
without errors.
More information about the Gcc-bugs
mailing list