summaryrefslogtreecommitdiff
path: root/test/lit/exec/array.wast
blob: 7e74c7b7d745998d57eb45acc41b6b97cad78e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.

;; RUN: wasm-opt %s -all --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s

(module
 (type $array (array (mut i8)))

 ;; CHECK:      [fuzz-exec] calling func
 ;; CHECK-NEXT: [fuzz-exec] note result: func => 1
 (func "func" (result i32)
  ;; Verifies the order of execution is correct - we should return 1, not 2.
  (array.new $array
   (return (i32.const 1))
   (return (i32.const 2))
  )
 )
)
;; CHECK:      [fuzz-exec] calling func
;; CHECK-NEXT: [fuzz-exec] note result: func => 1
;; CHECK-NEXT: [fuzz-exec] comparing func