summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/Oz_fuzz-exec_all-features.txt21
-rw-r--r--test/passes/Oz_fuzz-exec_all-features.wast12
2 files changed, 33 insertions, 0 deletions
diff --git a/test/passes/Oz_fuzz-exec_all-features.txt b/test/passes/Oz_fuzz-exec_all-features.txt
index 867179092..48c9ecb5e 100644
--- a/test/passes/Oz_fuzz-exec_all-features.txt
+++ b/test/passes/Oz_fuzz-exec_all-features.txt
@@ -23,18 +23,22 @@
[trap unreachable]
[fuzz-exec] calling cast-null-anyref-to-gc
[LoggingExternalInterface logging 0]
+[fuzz-exec] calling br_on_data
+[LoggingExternalInterface logging 1]
(module
(type ${mut:i32} (struct (field (mut i32))))
(type $none_=>_none (func))
(type ${i32_f64} (struct (field i32) (field f64)))
(type $[mut:i8] (array (mut i8)))
(type $i32_=>_none (func (param i32)))
+ (type $anyref_=>_none (func (param anyref)))
(import "fuzzing-support" "log-i32" (func $log (param i32)))
(export "structs" (func $0))
(export "arrays" (func $1))
(export "rtts" (func $2))
(export "br_on_cast" (func $3))
(export "cast-null-anyref-to-gc" (func $4))
+ (export "br_on_data" (func $5))
(func $0 (; has Stack IR ;)
(local $0 (ref null ${mut:i32}))
(call $log
@@ -168,6 +172,21 @@
(i32.const 0)
)
)
+ (func $5 (; has Stack IR ;) (param $0 anyref)
+ (drop
+ (block $data (result (ref null data))
+ (drop
+ (br_on_data $data
+ (local.get $0)
+ )
+ )
+ (call $log
+ (i32.const 1)
+ )
+ (ref.null data)
+ )
+ )
+ )
)
[fuzz-exec] calling structs
[LoggingExternalInterface logging 0]
@@ -194,3 +213,5 @@
[trap unreachable]
[fuzz-exec] calling cast-null-anyref-to-gc
[LoggingExternalInterface logging 0]
+[fuzz-exec] calling br_on_data
+[LoggingExternalInterface logging 1]
diff --git a/test/passes/Oz_fuzz-exec_all-features.wast b/test/passes/Oz_fuzz-exec_all-features.wast
index fb3be9691..a33f02fb5 100644
--- a/test/passes/Oz_fuzz-exec_all-features.wast
+++ b/test/passes/Oz_fuzz-exec_all-features.wast
@@ -184,4 +184,16 @@
)
)
)
+ (func "br_on_data" (param $x anyref)
+ (local $y anyref)
+ (drop
+ (block $data (result dataref)
+ (local.set $y
+ (br_on_data $data (local.get $x))
+ )
+ (call $log (i32.const 1))
+ (ref.null data)
+ )
+ )
+ )
)