1;;! gc = true 2;;! bulk_memory = true 3 4(module 5 (type $s (struct (field (mut i32)))) 6 (type $arr (array (ref null $s))) 7 8 (elem $e (ref null $s) (struct.new $s (i32.const 42))) 9 10 (import "wasmtime" "gc" (func $gc)) 11 12 (func (export "test") (result i32) 13 (array.new_elem $arr $e (i32.const 0) (i32.const 1)) 14 15 (call $gc) 16 (drop (struct.new $s (i32.const 0))) 17 (drop (struct.new $s (i32.const 0))) 18 (drop (struct.new $s (i32.const 0))) 19 (drop (struct.new $s (i32.const 0))) 20 (drop (struct.new $s (i32.const 0))) 21 22 (struct.get $s 0 (array.get $arr (i32.const 0))) 23 ) 24) 25 26(assert_return (invoke "test") (i32.const 42)) 27