https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121233
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID CC| |amonakov at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- You have to compile in standards-conforming mode by specifying -std=c++17, or explicitly specify -fexcess-precision=standard, or avoid producing intermediates with excess precision by preferring SSE, -mfpmath=sse. Otherwise, compiling for x87 instructions with 80-bit registers is full of gotchas like that. By default GCC is not standards-conforming here, making this outcome possible.