https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96327
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- I don't think bug 3506 has been fixed (its status seems wrong to me). But don't worry, there are several other duplicates that still have status NEW (bug 50677 for instance). This is a sensible enhancement request, I think some gcc backends already do a similar optimization, it simply isn't a priority, because volatile almost means "don't optimize this". At least the difference between the gcc and clang codes matches those other PRs. Not sure why you are talking of address computations.