https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245
--- Comment #60 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 5 should have improved things a bit by wide-ints as small INTEGER_CSTs now use 8 bytes less memory. A quick check with GCC 6 shows around ~200MB memory use for the attached testcase. Note that your last example uses C++ initializer lists which have its own issue (quite expensive wrapping) and separate bugreports.