summaryrefslogtreecommitdiff
path: root/test/lit/merge
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/merge')
-rw-r--r--test/lit/merge/table64.wat19
-rw-r--r--test/lit/merge/table64.wat.second12
2 files changed, 31 insertions, 0 deletions
diff --git a/test/lit/merge/table64.wat b/test/lit/merge/table64.wat
new file mode 100644
index 000000000..a313b5bc3
--- /dev/null
+++ b/test/lit/merge/table64.wat
@@ -0,0 +1,19 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+
+;; RUN: wasm-merge %s first %s.second second --rename-export-conflicts -all -S -o - | filecheck %s
+
+;; An empty module. The interesting part is in the second module: we should
+;; copy the i64 table properly.
+(module
+)
+;; CHECK: (type $0 (func))
+
+;; CHECK: (table $table i64 15 15 funcref)
+
+;; CHECK: (elem $0 (i64.const 0) $second)
+
+;; CHECK: (export "table" (table $table))
+
+;; CHECK: (func $second (type $0)
+;; CHECK-NEXT: (nop)
+;; CHECK-NEXT: )
diff --git a/test/lit/merge/table64.wat.second b/test/lit/merge/table64.wat.second
new file mode 100644
index 000000000..cbc5a78fb
--- /dev/null
+++ b/test/lit/merge/table64.wat.second
@@ -0,0 +1,12 @@
+;; A module with a wasm64 table. We must copy it properly when we merge.
+(module
+ (table $table i64 15 15 funcref)
+
+ (elem $0 (i64.const 0) $second)
+
+ (export "table" (table $table))
+
+ (func $second)
+)
+
+