http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47575
--- Comment #2 from Zdenek Dvorak <rakdver at gcc dot gnu.org> 2011-02-01 16:56:57 UTC --- There is nothing in C standard requiring us to preserve global stores that are unused, unless they are volatile. Store motion is by far not the only optimization in gcc that affects global stores. That this happens in an endless loop is not important.