aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-25 15:33:02 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-01-31 14:16:49 +0100
commitff8a56950776dae4fbae6b42eb79b9798dad76e3 (patch)
tree4e24f312ea3d5f2071bca9d265fcf0df0e332c39 /gcc/tree-ssa-loop-manip.cc
parente66fec8e6ba35edf01f86c2bf6514109aba4ded2 (diff)
downloadgcc-ff8a56950776dae4fbae6b42eb79b9798dad76e3.zip
gcc-ff8a56950776dae4fbae6b42eb79b9798dad76e3.tar.gz
gcc-ff8a56950776dae4fbae6b42eb79b9798dad76e3.tar.bz2
gccrs: Desugar double borrows into two HIR:BorrowExpr's
We simply hit a gcc_unreachable() on double borrows but it seems reasonable to just desugar the AST into a borrow of a borrow to foo. Instead of a borrow expression with a flag to be respected. Fixes #1506 gcc/rust/ChangeLog: * hir/rust-ast-lower-expr.h: Lower double borrow expressions to two `HIR::BorrowExpr`s. * hir/tree/rust-hir-expr.h: Remove `is_double_borrow` field from `HIR::BorrowExpr`. * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Remove call to `gcc_unreachable` on double borrow expressions. gcc/testsuite/ChangeLog: * rust/compile/torture/issue-1506.rs: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions