summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.no-opts
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r--test/unit.fromasm.no-opts35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 1c0e87f6a..56436ab7f 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -1103,4 +1103,39 @@
(func $w
(nop)
)
+ (func $globalOpts
+ (local $x i32)
+ (local $y f64)
+ (set_local $x
+ (get_global $Int)
+ )
+ (set_local $y
+ (get_global $Double)
+ )
+ (i32.store8
+ (i32.const 13)
+ (i32.load
+ (i32.const 12)
+ )
+ )
+ (set_global $Double
+ (get_local $y)
+ )
+ (set_global $Int
+ (get_local $x)
+ )
+ (call $globalOpts)
+ (set_local $x
+ (get_global $Int)
+ )
+ (if
+ (i32.const 1)
+ (set_global $Int
+ (i32.const 20)
+ )
+ )
+ (set_global $Int
+ (get_local $x)
+ )
+ )
)