http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49563
Summary: Expansion forgets to set MEM_VOLATILE_P for TARGET_MEM_REF Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: baldr...@gcc.gnu.org In expr.c, this code if (TREE_THIS_VOLATILE (exp)) MEM_VOLATILE_P (temp) = 1; sets MEM_VOLATILE_P for a volatile MEM_REF. But this is not done for a volatile TARGET_MEM_REF. This doesn't matter right now because tree-ssa-loop-ivopts.c bails out if it sees a volatile memory reference, so volatile TARGET_MEM_REFs don't (yet) occur in the wild.