https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70343
Bug ID: 70343 Summary: internal compiler error: in tsubst_copy Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tower120 at gmail dot com Target Milestone: --- The following code cause ICE in 4.9.2, in 5.3 cause Segmentation fault. Works ok in non-templated version. Woks ok with clang and VS. http://coliru.stacked-crooked.com/a/82069f4880198da6 #include <iostream> // std::cout #include <new> // ::operator new #include <vector> #include <tuple> #include <type_traits> using namespace std; struct Empty{}; template<class T> /* <-- Because of Template */ struct Data{ int x; float y; int properties_parcel4[10]; Empty j = [&](){ int i = 10; properties_parcel4[0] = i; return Empty(); }(); }; int main () { Data<int> k; return 0; }