;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.

;; RUN: foreach %s %t wasm-opt -all --stub-unsupported-js -S -o - | filecheck %s

;; We should remove global exports, as wasm2js doesn't emit them in a fully
;; compatible form yet (they aren't instances of WebAssembly.Global). All the
;; global exports below should vanish, but not the function export.

(module
 ;; CHECK:      (type $0 (func))

 ;; CHECK:      (global $i32 i32 (i32.const 42))
 (global $i32 i32 (i32.const 42))

 ;; CHECK:      (global $v128 v128 (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
 (global $v128 v128 (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))

 (export "bad1" (global $v128))

 (export "bad2" (global $i32))

 ;; CHECK:      (export "good" (func $func))
 (export "good" (func $func))

 ;; CHECK:      (func $func (type $0)
 ;; CHECK-NEXT: )
 (func $func
 )
)

