https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9375|0 |1 is obsolete| | --- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 41347 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41347&action=edit patch I'm sitting on So this is the patch I am sitting on for a while. It's reasonably a cheap trick but is at the same time easily fooled by an intermediate (non-aliasing) store like in float *f; int g(int *a, int *b) { int x = *b; *f = 1.; *a = x; return *b; } which is why I haven't pushed it sofar. OTOH it might be good enough for the most cases. To make it more general one would need to store the seen value somewhere and verify we can use it. A bit hackish I'd say (well, a new global var would do, not that we don't already have this kind).