blob: 088d0e9dee3ac25120f5276b1b6a2b4dd51f6da8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
;; array.init_data refers to a data segment and therefore requires the datacount
;; section be emitted (so it can be validated, per the spec, using only previous
;; sections), which means bulk memory must be enabled.
;; RUN: not wasm-opt --enable-reference-types --enable-gc %s 2>&1 | filecheck %s
;; CHECK: Data segment operations require bulk memory
(module
(type $0 (array i8))
(memory $0 16 17)
(data $0 (i32.const 0) "")
(func $0
(array.init_data $0 $0
(ref.null $0)
(i32.const 0)
(i32.const 0)
(i32.const 0)
)
)
)
;; But it passes with the feature enabled.
;; RUN: wasm-opt --enable-reference-types --enable-gc --enable-bulk-memory %s
|