https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117695
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Tianyang Zhou from comment #9) > (In reply to Andrew Pinski from comment #8)). > Hi Andrew, > > Instead of marking the variable as volatile. Will disable loop-eliminating > related passes works for this circumstance? Well then -O0 will work.