https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71569
Bug ID: 71569 Summary: [5/6] Crash: External definition of template member from template struct Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: oliver.tale at web dot de Target Milestone: --- Created attachment 38718 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38718&action=edit gcc -v -save-temps crash.cpp Check out this: ------------------------------------------------------------ template <class T> class Foo { template <class U> static bool Bar; }; template<class T> template<class U> bool Foo<T>::Bar<U>; int main() { } ------------------------------------------------------------ I know that its not valid code, because <= 4.9.3 report the following: "5 : error: template declaration of 'bool Bar' static bool Bar; ^ 10 : error: expected initializer before '<' token bool Foo<T>::Bar<U>; ^" But since 5.1 and up to 6.1.1 - it just crashes: "crash.cpp:10:14: internal compiler error: in determine_specialization, at cp/pt.c:2075 bool Foo<T>::Bar<U>;" See the attachment for stack trace. I couldnt get my hand on a 4.9.4 or 5.0 or something newer than 6.1.1, maybe someone can track the exact version jump. Must be between 4.9.3 and 5.1.