summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/passes/gufa-refs.wast24
1 files changed, 22 insertions, 2 deletions
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index a27e07f5f..310bef59b 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -4504,10 +4504,10 @@
;; CHECK: (type $i2 (func_subtype (param i32) func))
(type $i2 (func (param i32)))
- ;; CHECK: (type $none_=>_i32 (func_subtype (result i32) func))
-
;; CHECK: (type $none_=>_none (func_subtype func))
+ ;; CHECK: (type $none_=>_i32 (func_subtype (result i32) func))
+
;; CHECK: (import "a" "b" (func $import (result i32)))
(import "a" "b" (func $import (result i32)))
@@ -4609,6 +4609,26 @@
(ref.func $reffed2)
)
)
+
+ ;; CHECK: (func $call_ref-nofunc (type $none_=>_none)
+ ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (ref.null nofunc)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $call_ref-nofunc
+ ;; Test a call_ref of something of type nofunc. That has a heap type, but it
+ ;; is not a signature type. We should not crash on that.
+ (call_ref $i1
+ (i32.const 1)
+ (ref.null nofunc)
+ )
+ )
)
;; Limited cone reads.