aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-09-04 15:28:46 +0100
committerPhilip Herron <philip.herron@embecosm.com>2023-09-04 16:56:29 +0000
commitfe9e3efdc04e1f99f7089b8cc03b30af5e9d45dd (patch)
tree357623e6b4ef960126aabce78ed1ea7855940031 /gcc/rust/hir/rust-hir-dump.cc
parent997fc94e109d2c2ca9731c12001f29cded32846b (diff)
downloadgcc-fe9e3efdc04e1f99f7089b8cc03b30af5e9d45dd.zip
gcc-fe9e3efdc04e1f99f7089b8cc03b30af5e9d45dd.tar.gz
gcc-fe9e3efdc04e1f99f7089b8cc03b30af5e9d45dd.tar.bz2
gccrs: Fix match-expression code-gen
We were massing the match scruitinee expression as a way to access the result of the expression. This is wrong and needs to be stored in a temporary otherwise it will cause the code to be regnerated for each time it is used. This is not an issue in the case where the expression is only used once. Fixes #1895 gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): use a temp for the value gcc/testsuite/ChangeLog: * rust/execute/torture/iter1.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