summaryrefslogtreecommitdiff
path: root/test/parse
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-12-03 21:24:11 -0800
committerGitHub <noreply@github.com>2020-12-03 21:24:11 -0800
commit215279faaca0913b574dbc7c8e4d0ad7d0e5139b (patch)
tree7f37c3f5612d01745ae52b88a3648c474c32053a /test/parse
parentf6a833f9b220786b18e083b01a117e679a33d8d0 (diff)
downloadwabt-215279faaca0913b574dbc7c8e4d0ad7d0e5139b.tar.gz
wabt-215279faaca0913b574dbc7c8e4d0ad7d0e5139b.tar.bz2
wabt-215279faaca0913b574dbc7c8e4d0ad7d0e5139b.zip
Select instr. with multiple results is invalid (#1582)
The reference-types proposal adds a select instruction with a type vector, but any number greater than 1 is invalid. Fixes #1577.
Diffstat (limited to 'test/parse')
-rw-r--r--test/parse/expr/bad-select-multi.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/parse/expr/bad-select-multi.txt b/test/parse/expr/bad-select-multi.txt
new file mode 100644
index 00000000..e9e0b34d
--- /dev/null
+++ b/test/parse/expr/bad-select-multi.txt
@@ -0,0 +1,21 @@
+;;; TOOL: wat2wasm
+;;; ARGS*: --enable-reference-types
+;;; ERROR: 1
+(module
+ (func
+ i32.const 0
+ i32.const 0
+ i32.const 0
+ i32.const 0
+ i32.const 0
+ select (result i32 i32)
+ unreachable
+ ))
+(;; STDERR ;;;
+out/test/parse/expr/bad-select-multi.txt:11:5: error: invalid arity in select instruction: 2.
+ select (result i32 i32)
+ ^^^^^^
+out/test/parse/expr/bad-select-multi.txt:11:5: error: type mismatch in function, expected [] but got [... i32, i32, i32, i32]
+ select (result i32 i32)
+ ^^^^^^
+;;; STDERR ;;)