http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54481
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-09-05 Component|c |tree-optimization Ever Confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-05 09:30:04 UTC --- The issue is that a.fn(&a) is _not_ pure. foo is, but to see that a.fn is always foo we'd have to know a.fn is always foo ... (we are not optimistically assuming this which isn't easily possible within any of our memory optimization frameworks). Confirmed anyway, in theory it should be possible.