summaryrefslogtreecommitdiff
path: root/test/lit/wasm-split
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/wasm-split')
-rw-r--r--test/lit/wasm-split/name-collision.wast16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lit/wasm-split/name-collision.wast b/test/lit/wasm-split/name-collision.wast
new file mode 100644
index 000000000..ccb615906
--- /dev/null
+++ b/test/lit/wasm-split/name-collision.wast
@@ -0,0 +1,16 @@
+;; Regression test for a bug in which colliding internal names between
+;; non-function exports would result in the wrong import names being used in the
+;; secondary module.
+
+;; RUN: wasm-split %s -o1 %t.1.wasm -o2 %t.2.wasm
+;; RUN: wasm-dis %t.2.wasm | filecheck %s
+
+;; CHECK-NOT: (import "primary" "memory" (table
+;; CHECK: (import "primary" "table" (table
+
+(module
+ (table $collide 1 funcref)
+ (memory $collide 1 1)
+ (export "table" (table $collide))
+ (export "memory" (memory $collide))
+)