https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121200
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect this might be already fixed even in GCC 14.3.0, see PR 119387. On the trunk (with -fno-checking since I didn't build with --enable-checking=release), it takes less than 3g at the peak.