;;; TOOL: wat2wasm
;;; ARGS*: --enable-simd
;;; ERROR: 1
(module
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_s 16)
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_u 16)
  (func (result i32) v128.const i32x4 0 0 0 0 i16x8.extract_lane_s 8)
  (func (result i32) v128.const i32x4 0 0 0 0 i16x8.extract_lane_u 8)
  (func (result i32) v128.const i32x4 0 0 0 0 i32x4.extract_lane 4)
  (func (result f32) v128.const i32x4 0 0 0 0 f32x4.extract_lane 4)
  (func (result f64) v128.const i32x4 0 0 0 0 f64x2.extract_lane 2)

  (func (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i8x16.replace_lane 16)
  (func (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i16x8.replace_lane 8)
  (func (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i32x4.replace_lane 4)
  (func (result v128) v128.const i32x4 0 0 0 0 f32.const 0 f32x4.replace_lane 4)
  (func (result v128) v128.const i32x4 0 0 0 0 f64.const 0 f64x2.replace_lane 2)

  ;; Test a 64-bit index.
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_s 0x100000000)
)
(;; STDERR ;;;
out/test/typecheck/bad-simd-lane.txt:5:47: error: lane index must be less than 16 (got 16)
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_s 16)
                                              ^^^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:6:47: error: lane index must be less than 16 (got 16)
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_u 16)
                                              ^^^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:7:47: error: lane index must be less than 8 (got 8)
  (func (result i32) v128.const i32x4 0 0 0 0 i16x8.extract_lane_s 8)
                                              ^^^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:8:47: error: lane index must be less than 8 (got 8)
  (func (result i32) v128.const i32x4 0 0 0 0 i16x8.extract_lane_u 8)
                                              ^^^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:9:47: error: lane index must be less than 4 (got 4)
  (func (result i32) v128.const i32x4 0 0 0 0 i32x4.extract_lane 4)
                                              ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:10:47: error: lane index must be less than 4 (got 4)
  (func (result f32) v128.const i32x4 0 0 0 0 f32x4.extract_lane 4)
                                              ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:11:47: error: lane index must be less than 2 (got 2)
  (func (result f64) v128.const i32x4 0 0 0 0 f64x2.extract_lane 2)
                                              ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:13:60: error: lane index must be less than 16 (got 16)
...unc (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i8x16.replace_lane 16)
                                                          ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:14:60: error: lane index must be less than 8 (got 8)
  (func (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i16x8.replace_lane 8)
                                                           ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:15:60: error: lane index must be less than 4 (got 4)
  (func (result v128) v128.const i32x4 0 0 0 0 i32.const 0 i32x4.replace_lane 4)
                                                           ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:16:60: error: lane index must be less than 4 (got 4)
  (func (result v128) v128.const i32x4 0 0 0 0 f32.const 0 f32x4.replace_lane 4)
                                                           ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:17:60: error: lane index must be less than 2 (got 2)
  (func (result v128) v128.const i32x4 0 0 0 0 f64.const 0 f64x2.replace_lane 2)
                                                           ^^^^^^^^^^^^^^^^^^
out/test/typecheck/bad-simd-lane.txt:20:47: error: lane index must be less than 16 (got 4294967296)
  (func (result i32) v128.const i32x4 0 0 0 0 i8x16.extract_lane_s 0x100000000)
                                              ^^^^^^^^^^^^^^^^^^^^
;;; STDERR ;;)
