diff options
Diffstat (limited to 'test/lit/global-only.wast')
-rw-r--r-- | test/lit/global-only.wast | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lit/global-only.wast b/test/lit/global-only.wast new file mode 100644 index 000000000..6dce13d6d --- /dev/null +++ b/test/lit/global-only.wast @@ -0,0 +1,13 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; Regression test for a bug where types on globals were not collected, so if +;; they weren't used anywhere else they were not emitted in the output. + +;; RUN: wasm-opt -all %s -S -o - | filecheck %s + +(module $parse + ;; CHECK: (type $t (struct )) + (type $t (struct)) + ;; CHECK: (global $g (ref null $t) (ref.null $t)) + (global $g (ref null $t) (ref.null $t)) +) |