http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40893
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rearnsha at gcc dot gnu.org --- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2010-10-08 13:04:49 UTC --- (In reply to comment #2) > Here's a minimal test case: > > void foo(unsigned int v) > { > *(volatile unsigned short *)0xabcdefab = (v); > } > > The compiler has to be extremely conservative with this code as it has a volatile memory reference to deal with. It must take extreme care not to modify that operation and one consequence of this is that it is then difficult to remove the narrowing operation.