https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100923
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|wrong code at -Os and above |wrong code at -O2 and above
|on x86_64-linux-gnu |on x86_64-linux-gnu
Ever confirmed|0 |1
Last reconfirmed| |2021-06-06
Status|UNCONFIRMED |NEW
Keywords| |alias, wrong-code
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
- working (-O2 -fno-strict-aliasing)
+ not working (-O2 -fstrict-aliasing)
- l.1_3 = l;
- e.2_5 = e;
- f.3_6 = f;
- *e.2_5 = f.3_6;
- _7 = *l.1_3;
- if (_7 != 0)
+ l.1_4 = l;
+ _5 = *l.1_4;
+ e.2_6 = e;
+ f.3_7 = f;
+ *e.2_6 = f.3_7;
+ if (_5 != 0)
So we swapped around the store to *e and the load from *l.