script { fn test(v1: b256) -> u64 { entry(v1: b256): v2 = ptr_to_int v1 to u64 ret u64 v2 } entry fn main() -> u64 { local b256 foo = const b256 0x2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b entry(): foo_ptr = get_local ptr b256, foo foo = load foo_ptr v1 = call test(foo) ret u64 v1 } } // regex: VAL=v\d+ // regex: ID=[[:alpha:]0-9_]+ // check: fn test($(foo_val=$ID): b256) -> u64 // check: local b256 $(tmp_loc=$ID) // check: $(tmp_ptr=$VAL) = get_local ptr b256, $tmp_loc // check: store $foo_val to $tmp_ptr // check: $(tmp_ptr_int=$VAL) = ptr_to_int $tmp_ptr to u64 // check: ret u64 $tmp_ptr_int // check: entry fn main() -> u64 // check: local b256 foo = const b256 0x2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b // check: $(foo_ptr=$VAL) = get_local ptr b256, foo // check: $(foo_val=$VAL) = load $foo_ptr