https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83484
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|link-failure |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2017-12-24 Ever confirmed|0 |1 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Wilhelm M from comment #3) > Here ist a simplified version of a MCVE: > > template<int> > struct X { > static constexpr int x = 0; > static constexpr int y = 1; > }; > > template<> > constexpr int X<1>::x = 2; // should be ok, but gives duplicate > initialization error The compiler is correct. > template<> > constexpr int X<1>::y; // should be ill-formed (constexpr must be > initialized), but gives undefined reference How do you get an undefined reference if the previous definition gives an error? But I think you're right that it should be ill-formed, and that makes the original testcase ill-formed. So the bug is "accepts-invalid" not "link-failure".