[Bug c++/87646] New: Wrong code at -O3 and above (but not at -O2 and below)

2018-10-18 Thread sukhovvl at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sukhovvl at gmail dot com Target Milestone: --- gcc 4.8.5 20150623 miscompiles the following code with -O3 optimization flag on x86-64 gcc 4.9 and above doesn't seem to have this bug Correct output with -O2

[Bug c++/87646] Wrong code at -O3 and above (but not at -O2 and below)

2018-10-18 Thread sukhovvl at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87646 --- Comment #1 from Vadim Sukhov --- Created attachment 44853 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44853&action=edit Test case (compile with -std=c++11 -O3)