https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61762
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-07-10 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. I noticed elsewhere that we don't optimize static const char string[8] = "Private"; unsigned int _2; <bb 2>: _2 = MEM[(char * {ref-all})&string]; to _2 = VIEW_CONVERT_EXPR <unsigned int> ("Private"); Mine. Note that when not expanding the memcpy to a plain assignment in GIMPLE GCC will likely do the "right" thing.