http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |WAITING Last reconfirmed| |2013-05-31 CC| |rguenth at gcc dot gnu.org Resolution|INVALID |--- Ever confirmed|0 |1 --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Dara Hazeghi from comment #5) > Sorry to ask again on this, but after re-reading, I'm not sure I understand > the type-punning argument here: > > **ppll = ll; // write to u.ll > *k = 0; // write to u.i > > j = *ppa; // u not touched > ia[0][0] = *j; // u not touched > > printf("%d\n", u.i); // read from u.i > > > From what I can tell, this is in fact reading the last member written to (so > not falling under the unspecified behaviors listed in annex J / 6.2.6.1). > Perhaps there is an additional restriction I am missing? If the above is what really happens (the testcase is quite obfuscated ;)) then the testcase is valid. Can you try to un-obfuscate it somewhat?