https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110874
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to David Binderman from comment #6) > (In reply to Andrew Pinski from comment #4) > > There is a stack overflow while executing the FRE pass. > > I can confirm over 100,000 stack frames. > > Which -f flag causes the FRE pass to be executed ? > I assume it is in -O2, but not in -O1. Fre is enabled at -O1 but the IR changes before fre. I have not looked into what changes to the IR on why there is a difference between -O1 and -O2 yet.