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

--- Comment #5 from Robin Dapp <rdapp at gcc dot gnu.org> ---
> Steps to reproduce
> ------------------
> The bug surfaced while developing a RISC-V version of the Audiomark
> benchmark.
> It can be reproduced on this commit:
> https://github.com/sohail103/audiomark/commit/
> b044b6f13a8ca205bf63a5f99cf09a79f625c0cd
> 
> The defect was observed building AudioMark's speexdsp echo-canceller test
> (test_aec_f32), compiled and run natively on the SpaceMiT K1:
> 
>     FLAGS="-O3 -march=rv64gcv_zba_zbb_zbc_zbs_zvl256b -mrvv-vector-bits=zvl"
>     cmake .. -DPORT_DIR=ports/riscv/v -DCMAKE_C_FLAGS="$FLAGS"
>     make test_aec_f32
>     ./test_aec_f32        # SIGSEGV in memset (dst=0x40) via mdf.c:913
> 
> 
> The ports/riscv/v port force-includes RVV intrinsic kernels into mdf.c, which
> places RVV code next to the scalar memset-lowered loop; this is what exposes
> the a0 clobber. The scalar RISC-V (port/riscv) and Arm (port/arm) ports emit
> no vsetvli and do not
> fault.
> 
> Bug hunted down manually, report written mostly by Claude Opus 4.8

I wasn't able to reproduce the segfault with these options on qemu and GCC
15.3.  We backported at least once vsetvl fix to 15.3 if I'm not mistaken. 
Would you mind checking with 15.3?

Reply via email to