https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88433
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias Status|UNCONFIRMED |NEW Last reconfirmed| |2018-12-11 Component|target |rtl-optimization Depends on| |49330 Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I think this is a dup of the bug pointing to RTL alias analysis which cannot properly distinguish between pointers and integers when following to base terms. We expand from <bb 2> [local count: 1073741825]: ix_5 = (long int) &x; ix_6 = ix_5 + 4; ix.1_1 = (int *) ix_6; p = ix.1_1; q = &y; _14 = MEM[(char * {ref-all})&p]; _15 = MEM[(char * {ref-all})&q]; if (_14 == _15) goto <bb 3>; [33.00%] else goto <bb 4>; [67.00%] <bb 3> [local count: 354334802]: *ix.1_1 = 11; y.4_3 = y; __builtin_printf ("%i", y.4_3); [tail call] where RTL has plenty opportunity to track down ix.1_1 to &x + 4 which makes it non-aliasing to y. Note we are saved for f just beacuse of optimization propagating a conditional equivalence p_5 == &y. Dup of PR49330. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330 [Bug 49330] Integer arithmetic on addresses optimised with pointer arithmetic rules