https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120436
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <rd...@gcc.gnu.org>: https://gcc.gnu.org/g:6ccf845d9fa157e7ebcf2c589a9fc5d8f298961f commit r16-936-g6ccf845d9fa157e7ebcf2c589a9fc5d8f298961f Author: Robin Dapp <rd...@ventanamicro.com> Date: Mon May 26 16:16:36 2025 +0200 RISC-V: Avoid division by zero in check_builtin_call [PR120436]. In check_builtin_call we eventually perform a division by zero when no vector modes are present. This patch just avoids the division in that case. PR target/120436 gcc/ChangeLog: * config/riscv/riscv-vector-builtins-shapes.cc (struct vset_def): Avoid division by zero. (struct vget_def): Ditto. * config/riscv/riscv-vector-builtins.h (struct function_group_info): Use required_extensions_specified instead of duplicating code. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/pr120436.c: New test.