https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70824
Bug ID: 70824 Summary: cc1plus consumes all available memory on specific template code Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trulsjo at gmail dot com Target Milestone: --- Created attachment 38348 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38348&action=edit Prerocessed source for failed compile Compiling this code with g++ 6.1.0 causes cc1plus to consume all available memory (or at least more than 12GB): #include <algorithm> template <class Src> size_t a() { const int v = std::max({1}); return v; } Compiled with g++ TJOTest.cpp -c --save-temps gcc version is 6.1.0 release, compiled on Ubuntu 16.04 system with ./configure && make && make install The same code compiles successfully on stock compiler in Ubuntu 16.04 (g++ 5.3.1-14ubuntu2) 5.3.1 20160413