https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121661
--- Comment #10 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #7) > (In reply to Hongtao Liu from comment #6) > > Looks correct in the gimple > > The bug only happens at -O0. At higher levels it is ok. https://godbolt.org/z/M979PM88a this is O2, it also prints 0.