summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/ref-cast-nop.wast18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lit/ref-cast-nop.wast b/test/lit/ref-cast-nop.wast
new file mode 100644
index 000000000..6e49508d5
--- /dev/null
+++ b/test/lit/ref-cast-nop.wast
@@ -0,0 +1,18 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
+
+;; RUN: wasm-opt -all %s -S --roundtrip -o - | filecheck %s
+
+(module
+ ;; CHECK: (type $struct (struct (field i32)))
+ (type $struct (struct i32))
+ ;; CHECK: (func $ref.cast_nop_static (param $x (ref any)) (result (ref $struct))
+ ;; CHECK-NEXT: (ref.cast_nop_static $struct
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $ref.cast_nop_static (param $x (ref any)) (result (ref $struct))
+ (ref.cast_nop_static $struct
+ (local.get $x)
+ )
+ )
+)