http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47409
--- Comment #21 from Francesco Zappa Nardelli <francesco.zappa.nardelli at gmail dot com> --- (In reply to Richard Biener from comment #20) > > However the code I reported in bug 58409, which has been marked duplicate of > > this bug, still exhibits the incorrect reordering of volatile accesses. It > > thus seems to me that either bug 58409 is not a duplicate of this one, or > > the fix is incomplete. > > It is a duplicate of this one because it is about a volatile struct member > in a not volatile object g_3[1][1][1]. And it is about the aggregate > assignment to that struct. Agreed. What I don't understand is the fact that the commits that led to the recent gcc svn trunk gcc version 4.9.0 20130912 (experimental) (GCC) solve the problem with the code in comment 16, but do not prevent the reordering of volatile writes described in bug 58409. As a consequence, it seems to me that gcc does not yet implement a correct semantics for accesses to volatile struct members in non volatile objects. Am I missing something or another fix is to be expected? Thanks. -francesco