https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109773
Bug ID: 109773 Summary: RISC-V: ICE when build RVV Intrinisc Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pan2.li at intel dot com Target Milestone: --- There will be one ICE when trying to build the below code with the option '-march=rv64gcv -O3 -fno-schedule-insns -c -S test.c -o -'. #include "riscv_vector.h" void f4 (int32_t * a, int32_t * b, int n) { if (n <= 0) return; int i = n; size_t vl = __riscv_vsetvl_e8mf4 (i); for (; i >= 0; i--) { vint32m1_t v = __riscv_vle32_v_i32m1 (a + i, vl); v = __riscv_vle32_v_i32m1_tu (v, a + i + 100, vl); __riscv_vse32_v_i32m1 (b + i, v, vl); if (i >= vl) continue; if (i == 0) return; vl = __riscv_vsetvl_e8mf4 (vl); } } The output of compiling. > riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 -fno-schedule-insns -c -S > test.c -o - .file "test.c" .option nopic .attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zifencei2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0" .attribute unaligned_access, 0 .attribute stack_align, 16 .text riscv64-unknown-linux-gnu-gcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://gcc.gnu.org/bugs/> for instructions. > riscv-gnu-toolchain@<22:46:54 一 5月 > 08>[4]*1*[3s]"~/bin/gnu-rv64-linux-13/bin/riscv64-unknown-linux-gnu-gcc > -march=rv64gcv -O3 -fno-schedule-insns -c -S test.c -o -" >> ~/bin/gnu-rv64-linux-13/bin/riscv64-unknown-linux-gnu-gcc --version riscv64-unknown-linux-gnu-gcc (g1c9c53f0256) 13.1.1 20230508 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.