aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/nr2/exclude
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/testsuite/rust/compile/nr2/exclude
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/testsuite/rust/compile/nr2/exclude')
-rw-r--r--gcc/testsuite/rust/compile/nr2/exclude1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude
index 945a697..e7344ed 100644
--- a/gcc/testsuite/rust/compile/nr2/exclude
+++ b/gcc/testsuite/rust/compile/nr2/exclude
@@ -195,4 +195,5 @@ issue-266.rs
additional-trait-bounds2.rs
auto_traits2.rs
auto_traits3.rs
+issue-3140.rs
# please don't delete the trailing newline