;;; TOOL: wat2wasm
;;; ARGS: --enable-bulk-memory
;;; ERROR: 1

(module
  (memory 1)
  (func
    i32.const 0 i32.const 0 i32.const 0 memory.init 0
    data.drop 0
  )

  (table 1 anyfunc)
  (func
    i32.const 0 i32.const 0 i32.const 0 table.init 0
    elem.drop 0
  )
)
(;; STDERR ;;;
out/test/typecheck/bad-bulk-memory-invalid-segment.txt:8:53: error: data_segment variable out of range: 0 (max 0)
    i32.const 0 i32.const 0 i32.const 0 memory.init 0
                                                    ^
out/test/typecheck/bad-bulk-memory-invalid-segment.txt:9:15: error: data_segment variable out of range: 0 (max 0)
    data.drop 0
              ^
out/test/typecheck/bad-bulk-memory-invalid-segment.txt:14:52: error: elem_segment variable out of range: 0 (max 0)
    i32.const 0 i32.const 0 i32.const 0 table.init 0
                                                   ^
out/test/typecheck/bad-bulk-memory-invalid-segment.txt:15:15: error: elem_segment variable out of range: 0 (max 0)
    elem.drop 0
              ^
;;; STDERR ;;)
