https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80272
Bug ID: 80272 Summary: g++ runs out of memory and crashes Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bkropki at yahoo dot co.uk Target Milestone: --- Created attachment 41096 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41096&action=edit C++ code which crashes g++ g++ runs out of memory and crashes, when the following simple code is compiled #include <array> const int ARR_SIZE = 0x10000; // 64 K struct A { char whatever; A() { whatever = 0; }; // removing constructor removes the problem }; class B { std::array<std::array<A, 8>, ARR_SIZE> values; public: B(); }; B::B() : values{} // removing explicit initialisation of values (i.e. removing ": values{}") removes the problem {} int main() { return 0; }