https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120400
--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #8) > (In reply to Andrew Pinski from comment #7) > > I think if you set TREE_SIDE_EFFECTS on the decls that have a D_V_E, then it > > might just work. > > i can also try that (but I'd want to avoid doing something that's possibly > fragile). Setting that on the decls does "work" (as I read tree.h that is effectively making those vars "volatile"). I'll do this for now, but would be interested if there's some better strategy (other than doing two nested ifs).