aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-03-31 17:58:24 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2025-04-08 10:17:11 +0200
commite873e2a0b15871fb0bcdb07155fc9a7407f66286 (patch)
tree649eab7e338395eb2c4411799879014e9663317a /gcc/rust/backend/rust-compile-resolve-path.cc
parent0282fd7cabe365e639deb8848cf29fbd00470e63 (diff)
downloadgcc-e873e2a0b15871fb0bcdb07155fc9a7407f66286.zip
gcc-e873e2a0b15871fb0bcdb07155fc9a7407f66286.tar.gz
gcc-e873e2a0b15871fb0bcdb07155fc9a7407f66286.tar.bz2
gccrs: Fix ICE when doing shift checks on const decl
Const decls are just delcarations wrapping the value into the DECL_INITIAL and the shift checks we have assume no decls are involved and its just flat values. This patch simply unwraps the constant values if they exist. Fixes Rust-GCC#3665 gcc/rust/ChangeLog: * rust-gcc.cc (arithmetic_or_logical_expression): unwrap const decls gcc/testsuite/ChangeLog: * rust/compile/issue-3665.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions