Open
Description
Some of the expression, when used as initializers of asm
-block arguments cause the following ICE:
Internal compiler error: Could not find a valid lexical scope for this source location.
E.g., in the below example, each of the asm
blocks will emit that ICE:
script;
fn main() {
let _ = asm(p: if true { 1 } else { 2 }) { p: u64 };
let _ = asm(p: (if true { 1 } else { 2 })) { p: u64 };
let _ = asm(p: { 1 }) { p: u64 };
}
Note that in general, we support arbitrary expressions in asm
arguments initializers. E.g., this compiles as expected:
script;
fn main() {
let _ = asm(p: 1 + 2) { p: u64 };
let _ = asm(p: return) { p: u64 };
}