19 lines
309 B
Plaintext
19 lines
309 B
Plaintext
|
|
// mir-phi-two - branch assigns two locals and merges
|
||
|
|
|
||
|
|
static box Main {
|
||
|
|
main() {
|
||
|
|
local x
|
||
|
|
local y
|
||
|
|
if 1 < 2 {
|
||
|
|
x = 10
|
||
|
|
y = 20
|
||
|
|
} else {
|
||
|
|
x = 30
|
||
|
|
y = 40
|
||
|
|
}
|
||
|
|
// Expect x=10,y=20 → x+y=30
|
||
|
|
return x + y
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|