http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53049
--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-04-19 19:31:12 UTC --- In tree-ssa-ter.c:is_replaceable_p() there is: /* Leave any stmt with volatile operands alone as well. */ if (gimple_has_volatile_ops (stmt)) return false; and in tree-ssa-ter.c:find_replaceable_in_bb(): /* Mark expression as replaceable unless stmt is volatile, or the def variable has the same root variable as something in the substitution list, or the def and use span a call such that we'll expand lifetimes across a call. */ if (gimple_has_volatile_ops (stmt) || same_root_var So it leaves volatiles alone -- at least that's what the comments indicate and why there are tests for has_volatile at all. If you drag A over B, you can just as well say that B is dragged over A. This means that no volatile must be crossed as a statement is moved around. Otherwise, a programm will never be able to state "There is something going on that is important, but cannot be expressed". C has no notion of execution time at all, but everyone knows that execution time in /any/ program is crucial... Is there a way in the backend to interfere with that malicous transforms? A builtin is treated as CALL at this level, and calls are skipped to. So it's all in a mess...