summaryrefslogtreecommitdiff
path: root/test/regress/regress-21.txt
blob: d05d26fdb49266c9103fe972e4a49e321a5b7eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;;; TOOL: wat2wasm
;;; ERROR: 1
(module
  (type $foo.ty       (func))
  (global $g i32 (i32.const -1))
  (func $foo (type $foo.ty)
     (global.set $g (i32.const 1))
  )
  (export "foo" (func $foo))
)
(;; STDERR ;;;
out/test/regress/regress-21.txt:7:7: error: can't global.set on immutable global at index 0.
     (global.set $g (i32.const 1))
      ^^^^^^^^^^
;;; STDERR ;;)