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

            Bug ID: 122692
           Summary: U16 array to U8 array saturation test fails on
                    riscv64-linux-gnu
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: john_platts at hotmail dot com
  Target Milestone: ---

Created attachment 62811
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62811&action=edit
Test program to reproduce GCC 15 bug on riscv64-linux-gnu

Attached is a test program that fails on riscv64-linux-gnu when compiled with
GCC 15.2.0 but runs successfully on x86_64-linux-gnu when compiled with GCC
15.2.0.

The same compiler bug also causes failures in TestAllReorderDemote2To in Google
Highway with the EMU128 target on RISC-V, and this GCC compiler bug is reported
at https://github.com/google/highway/issues/2793.

The attached test program needs to be compiled with the -O3 -fPIC -fPIE -fpie
-std=c++17 options.

To trigger this GCC 15 compiler bug, the arrays need to be allocated through a
function with the __attribute__((__noinline__,__noipa__)) that in turn
allocates the array using ::malloc.

Reply via email to