aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/Rematerialiser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia/Rematerialiser.cpp')
-rw-r--r--test/libjulia/Rematerialiser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libjulia/Rematerialiser.cpp b/test/libjulia/Rematerialiser.cpp
index ae254ad9..020f0020 100644
--- a/test/libjulia/Rematerialiser.cpp
+++ b/test/libjulia/Rematerialiser.cpp
@@ -126,4 +126,13 @@ BOOST_AUTO_TEST_CASE(reassignment)
);
}
+BOOST_AUTO_TEST_CASE(do_not_move_out_of_scope)
+{
+ // Cannot replace by `let b := x` by `let b := a` since a is out of scope.
+ CHECK(
+ "{ let x { let a := sload(0) x := a } let b := x }",
+ "{ let x { let a := sload(0) x := a } let b := x }"
+ );
+}
+
BOOST_AUTO_TEST_SUITE_END()