Add regression tests of BA issue cases (#3462)

This commit is contained in:
Zhang, Yi
2024-05-23 13:53:53 +08:00
committed by GitHub
parent 6fdfedb08a
commit f378edc408
149 changed files with 2763 additions and 0 deletions

View File

@ -0,0 +1,24 @@
(module
(data $string_data "asdf")
(func $print (import "spectest" "print_i32") (param $i i32))
(memory $memory (export "memory") 1)
(type $string (array (mut i8)))
(type $var (struct (field (ref null $string))))
(func $test (param $param (ref $var))
(local.get $param)
(struct.get $var 0)
(ref.as_non_null)
(array.len)
(call $print)
)
(func $init
(local $str (ref $string))
(array.new_data $string $string_data (i32.const 0) (i32.const 4))
(local.set $str)
(struct.new $var (local.get $str))
(call $test)
)
(export "_start" (func $init))
)