File: ref-func-multivalue.wast

package info (click to toggle)
binaryen 120-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,284 kB
  • sloc: cpp: 189,449; javascript: 62,189; ansic: 14,087; python: 5,379; pascal: 441; sh: 77; makefile: 30; asm: 27
file content (19 lines) | stat: -rw-r--r-- 563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;; A local ref of a function type with multiple results requires multivalue.
;; RUN: not wasm-opt %s 2>&1 | filecheck %s

;; CHECK: all used types should be allowed

(module
  (type $T (func (param i32 i32) (result i32 i32 i32)))

  (func $foo
    (local $t (ref null $T))
  )
)

;; Still fails with just reference types or multivalue.
;; RUN: not wasm-opt --enable-reference-types %s 2>&1 | filecheck %s
;; RUN: not wasm-opt --enable-multivalue %s 2>&1 | filecheck %s

;; But it passes with both.
;; RUN: wasm-opt --enable-reference-types --enable-multivalue %s