https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94587
Bug ID: 94587 Summary: Intrinsics optimization bug with -O2 -march=skylake-avx512 Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: lopresti at gmail dot com Target Milestone: --- Created attachment 48265 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48265&action=edit Minimal test case for skylake-avx512 intrinsics optimization bug This bug appears to be present across at least GCC 8 and GCC 9. Compile the attached program using "g++ -O2 -march=skylake-avx512" and run it. Expected result: No output, exit status 0. Actual result: "WRONG -0.99999999999999789058", exit status 2. To make the problem go away, do any of the following: - Use "-march=corei7" ; or - Remove the "__attribute__((noinline))" from the rot90() function ; or - Add "-DHEISENBUG" to the command line