1 // RUN: %clang_cc1 -verify -triple aarch64-none-linux-gnu -target-feature +sve -fsyntax-only %s
3 // REQUIRES: aarch64-registered-target
7 void subscript(svint8_t i8
, svint16_t i16
, svint32_t i32
, svint64_t i64
,
8 svuint8_t u8
, svuint16_t u16
, svuint32_t u32
, svuint64_t u64
,
9 svfloat16_t f16
, svfloat32_t f32
, svfloat64_t f64
,
11 (void)b
[0]; // expected-error{{subscript of svbool_t is not allowed}}
12 (void)b
[0.f
]; // expected-error{{subscript of svbool_t is not allowed}}
13 (void)b
[0.]; // expected-error{{subscript of svbool_t is not allowed}}
15 (void)i8
[0.f
]; // expected-error{{array subscript is not an integer}}
16 (void)i8
[0.]; // expected-error{{array subscript is not an integer}}
18 (void)u8
[0.f
]; // expected-error{{array subscript is not an integer}}
19 (void)u8
[0.]; // expected-error{{array subscript is not an integer}}
21 (void)i16
[0.f
]; // expected-error{{array subscript is not an integer}}
22 (void)i16
[0.]; // expected-error{{array subscript is not an integer}}
24 (void)u16
[0.f
]; // expected-error{{array subscript is not an integer}}
25 (void)u16
[0.]; // expected-error{{array subscript is not an integer}}
27 (void)i32
[0.f
]; // expected-error{{array subscript is not an integer}}
28 (void)i32
[0.]; // expected-error{{array subscript is not an integer}}
30 (void)u32
[0.f
]; // expected-error{{array subscript is not an integer}}
31 (void)u32
[0.]; // expected-error{{array subscript is not an integer}}
33 (void)i64
[0.f
]; // expected-error{{array subscript is not an integer}}
34 (void)i64
[0.]; // expected-error{{array subscript is not an integer}}
36 (void)u64
[0.f
]; // expected-error{{array subscript is not an integer}}
37 (void)u64
[0.]; // expected-error{{array subscript is not an integer}}
39 (void)f16
[0.f
]; // expected-error{{array subscript is not an integer}}
40 (void)f16
[0.]; // expected-error{{array subscript is not an integer}}
42 (void)f32
[0.f
]; // expected-error{{array subscript is not an integer}}
43 (void)f32
[0.]; // expected-error{{array subscript is not an integer}}
45 (void)f64
[0.f
]; // expected-error{{array subscript is not an integer}}
46 (void)f64
[0.]; // expected-error{{array subscript is not an integer}}