https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80930
--- Comment #2 from Franz Sirl <sirl at gcc dot gnu.org> --- Further investigation shows that "-O2 -fsanitize=undefined" is enough to trigger the excessive memory usage. The big difference between GCC-6 and GCC-7 is that the function causing this has ~200000 blocks in GCC-6 and ~300000 blocks in GCC-7. I'll try to investigate the reason for this 50% increase a bit.