aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-01-07 12:32:43 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-21 12:56:55 +0100
commita362f8a7d78da919d3e8ad5d924109a3c1521131 (patch)
tree9f92330f8d5821ce515b806f8be093ffd192296e /gcc/rust/backend/rust-compile-expr.h
parentc35aa64fbf71c11d30c7a9f8c37a9fc07ada8a7b (diff)
downloadgcc-a362f8a7d78da919d3e8ad5d924109a3c1521131.zip
gcc-a362f8a7d78da919d3e8ad5d924109a3c1521131.tar.gz
gcc-a362f8a7d78da919d3e8ad5d924109a3c1521131.tar.bz2
gccrs: fix ICE in borrows to invalid expressions
We need to check if the borrowed value is valid before creating the reference type. Otherwise this will lead to an ICE. Fixes Rust-GCC#3140 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): check for error * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): likewise and remove debug error gcc/testsuite/ChangeLog: * rust/compile/issue-3046.rs: remove old error message * rust/compile/nr2/exclude: nr2 cant handle this * rust/compile/issue-3140.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions