]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix ICE in array ref constexpr
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 28 Mar 2025 16:59:33 +0000 (16:59 +0000)
committerPhilip Herron <philip.herron@embecosm.com>
Fri, 28 Mar 2025 18:34:20 +0000 (18:34 +0000)
commita0b21c94157d85f4ab87aa9aee83cb629678f72a
treebc773c5bb2e8812f2bd3b1d00ec94d7c348629da
parentebac3ab5bec8a6f08f4549edfee799e64c719d0c
gccrs: Fix ICE in array ref constexpr

Since 898d55ad7e2 was fixed to remove the VIEW_CONVERT_EXPR from
array expressions we can now turn on the array element access
const expr.

Fixes Rust-GCC#3563

gcc/rust/ChangeLog:

* backend/rust-constexpr.cc (eval_store_expression): turn this back on

gcc/testsuite/ChangeLog:

* rust/compile/issue-3563.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/backend/rust-constexpr.cc
gcc/testsuite/rust/compile/issue-3563.rs [new file with mode: 0644]