85b5b2a8e4
Wrote some small test cases that use while loops and moves, to make sure the poststate for the loop body gets propagated into the new prestate and deinitialization gets reflected. Along with that, rewrite the code for intersecting states. I still find it dodgy, but I guess I'll continue trying to add more tests. Also, I'll probably feel better about it once I start formalizing the algorithm.
16 lines
210 B
Rust
16 lines
210 B
Rust
// xfail-stage0
|
|
fn main() {
|
|
|
|
let int y = 42;
|
|
let int z = 42;
|
|
let int x;
|
|
while (z < 50) {
|
|
z += 1;
|
|
while (false) {
|
|
x <- y;
|
|
y = z;
|
|
}
|
|
log y;
|
|
}
|
|
assert (y == 42 && z == 50);
|
|
} |