This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/84077] [7/8 Regression] Likely wrong code with `__builtin_expect()` on i686-linux-gnu
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Feb 2018 20:36:09 +0000
- Subject: [Bug target/84077] [7/8 Regression] Likely wrong code with `__builtin_expect()` on i686-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-84077-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84077
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've managed to reproduce it with just
-m32 -std=c++11 -fopenmp -O2 -fPIC -ftree-vectorize dcp.ii -o dcp.s
but if I hack up std::__addressof (to avoid using __builtin_addressof and make
it no longer constexpr), I get the same bad behavior with up to r221581 (can't
go much further than that because it doesn't link anymore), so the same
behavior is with both GCC 5.x and 6.x.
Using -O0 instead of -O2 fixes it.
Have you tried -fsanitize=address -fsanitize=undefined on the code?