]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: fix internal error on global variable-length array
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 6 Jul 2024 09:56:19 +0000 (11:56 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Sat, 6 Jul 2024 09:59:00 +0000 (11:59 +0200)
commit8bc5561c43b195e1638e5acace8b41b3f7512be3
tree330eec04ec21ffdad032c2f399883d820770d779
parent9a7e3f57e1ab8e6e4cf5ea3c0998aa50c6220579
RISC-V: fix internal error on global variable-length array

This is an ICE in the RISC-V back-end calling tree_to_uhwi on the DECL_SIZE
of a global variable-length array.

gcc/
PR target/115591
* config/riscv/riscv.cc (riscv_valid_lo_sum_p): Add missing test on
tree_fits_uhwi_p before calling tree_to_uhwi.

gcc/testsuite/
* gnat.dg/array41.ads, gnat.dg/array41.adb: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gnat.dg/array41.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/array41.ads [new file with mode: 0644]