summaryrefslogtreecommitdiff
path: root/test/ctor-eval/indirect-call3.wast
blob: 1c01513b10555bd5924529ae6063482a41b5e02c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(module
  (import "env" "_abort" (func $_abort))
  (type $v (func))
  (memory 256 256)
  (data (i32.const 10) "waka waka waka waka waka")
  (table 2 2 funcref)
  (elem (i32.const 0) $_abort $call-indirect)
  (export "test1" (func $test1))
  (func $test1
    (call_indirect (type $v) (i32.const 1)) ;; safe to call
    (i32.store8 (i32.const 20) (i32.const 120))
  )
  (func $call-indirect
    (i32.store8 (i32.const 40) (i32.const 67))
  )
)