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?