diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-03-31 17:58:24 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2025-04-01 10:43:04 +0000 |
commit | eecf0cd6857d269fc9be9a858f2ba02189d756cc (patch) | |
tree | c7f3a268a36ecdd051e761821e24b5f40a301928 /gcc/rust/hir/rust-hir-dump.cc | |
parent | bdfdaef9069a557ac47384c1a845a9e3dcf02ccc (diff) | |
download | gcc-eecf0cd6857d269fc9be9a858f2ba02189d756cc.zip gcc-eecf0cd6857d269fc9be9a858f2ba02189d756cc.tar.gz gcc-eecf0cd6857d269fc9be9a858f2ba02189d756cc.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/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions