[Bug middle-end/96326] Incorrect loop optimization at -O3

2020-07-26 Thread pterjan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96326

--- Comment #2 from Pascal Terjan  ---
No:

$ gcc -O3 -Wall -fno-strict-aliasing  t.c; ./a.out 
24

However -fno-tree-loop-vectorize fixes it:

$ gcc -O3 -Wall -fno-tree-loop-vectorize t.c; ./a.out 
68

[Bug middle-end/96326] Incorrect loop optimization at -O3

2020-07-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96326

Andrew Pinski  changed:

   What|Removed |Added

  Component|c   |middle-end
   Keywords||wrong-code

--- Comment #1 from Andrew Pinski  ---
Does adding -fno-strict-aliasing helps?