]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RISC-V] Fix ICE due to bogus use of gen_rtvec
authorJeff Law <jlaw@ventanamicro.com>
Sat, 17 May 2025 15:37:01 +0000 (09:37 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 17 May 2025 15:37:01 +0000 (09:37 -0600)
commit7ed37d5ea48f6a51c81f73f35a64ca00c0325fd7
treef85d203cba213a9c62655919ebfe50aba889ef28
parent89935d56f768b4cdb767aae8de33f39f9b846a10
[RISC-V] Fix ICE due to bogus use of gen_rtvec

Found this while setting up the risc-v coordination branch off of gcc-15.  Not
sure why I didn't use rtvec_alloc directly here since we're going to initialize
the whole vector ourselves.  Using gen_rtvec was just wrong as it's walking
down a non-existent varargs list.  Under the "right" circumstances it can walk
off a page and fault.

This was seen with a test already in the testsuite (I forget which test), so no
new regression test.

Tested in my tester and verified the failure on the coordination branch is
resolved a well.  Waiting on pre-commit CI to render a verdict.

gcc/
* config/riscv/riscv-vect-permconst.cc (vector_permconst:process_bb):
Use rtvec_alloc, not gen_rtvec since we don't want/need to initialize
the vector.
gcc/config/riscv/riscv-vect-permconst.cc