http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57888
Bug ID: 57888 Summary: using non-type template parameter in constexpr function for non static data member intializer segfaults Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: plasmahh at gmx dot net While trying to find workaronuds for Bug #57887 I tried the following code: struct B { template<int N> struct A { constexpr int get_N() { return N; } // int X = N; int X = get_N(); void foo( ) { int x = N; } }; }; Which made gcc segfault. Whatever the validity of #57887 is, I don't think it should segfault here...