summaryrefslogtreecommitdiff
path: root/test/binary/function-local-count-zero.txt
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2019-03-08 17:02:30 -0800
committerGitHub <noreply@github.com>2019-03-08 17:02:30 -0800
commit8ab47309e20748c465e28773c92cef7029f5e410 (patch)
tree08beff8385d1f9dc1be153cb76b564f69cd0aa04 /test/binary/function-local-count-zero.txt
parenta44ee1228e2a1408ae773dfeb2dfc0463b371ea2 (diff)
downloadwabt-8ab47309e20748c465e28773c92cef7029f5e410.tar.gz
wabt-8ab47309e20748c465e28773c92cef7029f5e410.tar.bz2
wabt-8ab47309e20748c465e28773c92cef7029f5e410.zip
Allow a local type count of 0 (#1039)
It's legal in the wasm format to have a local type count of 0. I originally made it illegal to fix a wabt bug, and didn't notice because there were no spec tests for this behavior.
Diffstat (limited to 'test/binary/function-local-count-zero.txt')
-rw-r--r--test/binary/function-local-count-zero.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/binary/function-local-count-zero.txt b/test/binary/function-local-count-zero.txt
new file mode 100644
index 00000000..f70a50f6
--- /dev/null
+++ b/test/binary/function-local-count-zero.txt
@@ -0,0 +1,26 @@
+;;; TOOL: run-gen-wasm
+magic
+version
+section(TYPE) { count[1] function params[0] results[0] }
+section(FUNCTION) { count[2] sig[0] sig[0] }
+section(CODE) {
+ count[2]
+ func {
+ local_decls[1]
+ locals[0] i32
+ }
+ func {
+ local_decls[4]
+ locals[1] i64
+ locals[0] i32
+ locals[2] f64
+ locals[0] f32
+ }
+}
+(;; STDOUT ;;;
+(module
+ (type (;0;) (func))
+ (func (;0;) (type 0))
+ (func (;1;) (type 0)
+ (local i64 f64 f64)))
+;;; STDOUT ;;)