summaryrefslogtreecommitdiff
path: root/test/metadce/segments.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/metadce/segments.wast')
-rw-r--r--test/metadce/segments.wast14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/metadce/segments.wast b/test/metadce/segments.wast
new file mode 100644
index 000000000..96e0088e8
--- /dev/null
+++ b/test/metadce/segments.wast
@@ -0,0 +1,14 @@
+(module
+ (import "env" "g1" (global $g1 i32))
+ (import "env" "g2" (global $g2 i32))
+
+ (table $tbl funcref)
+ (elem (offset (global.get $g1)) funcref (ref.func $f))
+
+ (memory 3)
+ (data (offset (global.get $g2)) "xxx")
+
+ (export "f" (func $f))
+ (func $f (param i32)
+ (call_indirect (param i32) (local.get 0) (i32.load8_u (i32.const 0))))
+)