I think this is a gcc problem because it reproduces on Fedora 33 with g++ (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
In addition, the only compiler flag that is necessary to demonstrate the bug is '-O3' (on my Fedora 33 system). Any other level of optimization passes the test. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832132 Title: incorrect results for g++ -std=c++11 -O3 -DNDEBUG To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1832132/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs