This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/84077] [7/8 Regression] Likely wrong code with `__builtin_expect()` on i686-linux-gnu


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]