https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122304

            Bug ID: 122304
           Summary: UB MArch x86_64  v3/4 rounding Errors
           Product: gcc
           Version: 14.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crange76 at gmail dot com
  Target Milestone: ---

After hours of digging, I found out the reason this march build of
`opencolorio` keep failing tests is because of gcc's optimizations on x64_86v3+
binaries.

https://github.com/NixOS/nixpkgs/issues/398621#issuecomment-3411553517
This issue has good traceability between the project and the build failure, the
main problem is when I swapped the compiler to clang it worked flawlessly. It
didn't matter what I did it worked, and the following does not work on gcc 14.

DOES NOT WORK
* -march=x64_86v3
* -march=x64_86v4
* -march=x64_86v3 -fno-fast-math
* -march=x64_86v4 -fno-fast-math

since this was a rounding error test I thought explicitly disabling fastmath
might help.

WORKS
* -march=x64_86v2

WORKS ON CLANG
* -march=x64_86v2
* -march=x64_86v3
* -march=x64_86v4

Reply via email to