https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82697
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Status|UNCONFIRMED |NEW Known to work| |4.2.4 Keywords| |wrong-code Last reconfirmed| |2017-10-24 Ever confirmed|0 |1 Summary|Wrong optimization with |[6/7/8 Regression] Wrong |aliasing and "if" |optimization with aliasing | |and "if" Target Milestone|--- |6.5 Known to fail| |4.3.5, 4.8.5, 7.2.1, 8.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- This is a bug in conditional store elimination happening with -O1+ and -fstrict-aliasing: test (int * pi, long int * pl, int f) { long int cstore_10; <bb 2> [100.00%]: *pi_5(D) = 1; if (f_7(D) != 0) goto <bb 4>; [54.00%] else goto <bb 3>; [46.00%] <bb 3> [46.00%]: <bb 4> [100.00%]: # cstore_10 = PHI <0(3), 2(2)> *pl_3(D) = cstore_10; so it sank a store across another store.