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

(module
  (func
    i32.const 0 i32.const 0 i32.const 0 memory.init 0
    memory.drop 0
    i32.const 0 i32.const 0 i32.const 0 memory.copy
    i32.const 0 i32.const 0 i32.const 0 memory.fill
  )
)
(;; STDERR ;;;
out/test/typecheck/bad-bulk-memory-no-memory.txt:7:41: error: memory.init requires an imported or defined memory.
    i32.const 0 i32.const 0 i32.const 0 memory.init 0
                                        ^^^^^^^^^^^
out/test/typecheck/bad-bulk-memory-no-memory.txt:7:53: error: data_segment variable out of range (max 0)
    i32.const 0 i32.const 0 i32.const 0 memory.init 0
                                                    ^
out/test/typecheck/bad-bulk-memory-no-memory.txt:8:5: error: memory.drop requires an imported or defined memory.
    memory.drop 0
    ^^^^^^^^^^^
out/test/typecheck/bad-bulk-memory-no-memory.txt:8:17: error: data_segment variable out of range (max 0)
    memory.drop 0
                ^
out/test/typecheck/bad-bulk-memory-no-memory.txt:9:41: error: memory.copy requires an imported or defined memory.
    i32.const 0 i32.const 0 i32.const 0 memory.copy
                                        ^^^^^^^^^^^
out/test/typecheck/bad-bulk-memory-no-memory.txt:10:41: error: memory.fill requires an imported or defined memory.
    i32.const 0 i32.const 0 i32.const 0 memory.fill
                                        ^^^^^^^^^^^
;;; STDERR ;;)
