https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63267
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think GCC's behaviour is allowed by the standard. You do not explicitly instantiate the static member 'Test<int>::out', so the compiler provides an implicit instantiation which is placed at the end of the file, so it is initialized after the variable 'a'. See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#993 which clarified this result is permitted.