diff options
Diffstat (limited to 'test/passes/Oz_fuzz-exec_all-features.wast')
-rw-r--r-- | test/passes/Oz_fuzz-exec_all-features.wast | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/passes/Oz_fuzz-exec_all-features.wast b/test/passes/Oz_fuzz-exec_all-features.wast index 93935d5c4..520747075 100644 --- a/test/passes/Oz_fuzz-exec_all-features.wast +++ b/test/passes/Oz_fuzz-exec_all-features.wast @@ -8,6 +8,8 @@ (import "fuzzing-support" "log-i32" (func $log (param i32))) + (global $rtt (mut (rtt $extendedstruct)) (rtt.canon $extendedstruct)) + (func "structs" (local $x (ref null $struct)) (local $y (ref null $struct)) @@ -431,6 +433,48 @@ (array.get_u $bytes (local.get $x) (i32.const 12)) ) ) + (func "rtt_Fresh" + ;; Casting to the same sequence of rtt.subs works. + (call $log + (ref.test + (struct.new_default_with_rtt $extendedstruct + (rtt.sub $extendedstruct + (rtt.canon $struct) + ) + ) + (rtt.sub $extendedstruct + (rtt.canon $struct) + ) + ) + ) + ;; But not with fresh! + (call $log + (ref.test + (struct.new_default_with_rtt $extendedstruct + (rtt.sub $extendedstruct + (rtt.canon $struct) + ) + ) + (rtt.fresh_sub $extendedstruct + (rtt.canon $struct) + ) + ) + ) + ;; Casts with fresh succeed, if we use the same fresh rtt. + (global.set $rtt + (rtt.fresh_sub $extendedstruct + (rtt.canon $struct) + ) + ) + (call $log + (ref.test + (struct.new_default_with_rtt $extendedstruct + (global.get $rtt) + ) + (global.get $rtt) + ) + ) + ) ) (module (type $[mut:i8] (array (mut i8))) |