diff --git a/test/core/call.wast b/test/core/call.wast index 0eb0029d10..107924e3b2 100644 --- a/test/core/call.wast +++ b/test/core/call.wast @@ -225,6 +225,22 @@ (func (export "as-convert-operand") (result i64) (block (result i64) (i64.extend_i32_s (call $dummy (i32.const 1)))) ) + + (global $temp (mut i32) (i32.const 0)) + (func $add_one_to_global (result i32) + (local i32) + (global.set $temp (i32.add (i32.const 1) (global.get $temp))) + (global.get $temp) + ) + (func $add_one_to_global_and_drop + (drop (call $add_one_to_global)) + ) + (func (export "not-quite-a-tree") (result i32) + call $add_one_to_global + call $add_one_to_global + call $add_one_to_global_and_drop + i32.add + ) ) (assert_return (invoke "type-i32") (i32.const 0x132)) @@ -308,6 +324,9 @@ (assert_return (invoke "as-compare-right") (i32.const 1)) (assert_return (invoke "as-convert-operand") (i64.const 1)) +(assert_return (invoke "not-quite-a-tree") (i32.const 3)) +(assert_return (invoke "not-quite-a-tree") (i32.const 9)) + ;; Invalid typing (assert_invalid