1 // RUN: %clang_cc1 -fsyntax-only -verify -DNONEON -std=c++11 -triple aarch64 %s
3 // A target without sve should not be able to use sve types.
6 __SVFloat32_t x
; // expected-error {{SVE vector type '__SVFloat32_t' cannot be used in a target without sve}}
9 __attribute__((target("sve")))
10 void test_var_target() {
14 __attribute__((target("sve2")))
15 void test_var_target2() {
19 __attribute__((target("sve2-bitperm")))
20 void test_var_target3() {
24 __SVFloat32_t
other_ret();
25 __SVFloat32_t
test_ret() { // expected-error {{SVE vector type '__SVFloat32_t' cannot be used in a target without sve}}
26 return other_ret(); // expected-error {{SVE vector type '__SVFloat32_t' cannot be used in a target without sve}}
29 __attribute__((target("sve")))
30 __SVFloat32_t
test_ret_target() {
34 void test_arg(__SVFloat32_t arg
) { // expected-error {{SVE vector type '__SVFloat32_t' cannot be used in a target without sve}}
37 __attribute__((target("sve")))
38 void test_arg_target(__SVFloat32_t arg
) {
41 __clang_svint32x4_t
test4x() { // expected-error {{SVE vector type '__clang_svint32x4_t' cannot be used in a target without sve}}
42 __clang_svint32x4_t x
; // expected-error {{SVE vector type '__clang_svint32x4_t' cannot be used in a target without sve}}
46 __attribute__((target("sve")))
47 __clang_svint32x4_t
test4x_target() {
48 __clang_svint32x4_t x
;
52 // Pointers are still valid to pass around.
53 void foo(__SVFloat32_t
*&ptrA
, __SVFloat32_t
* &ptrB
) {
57 __SVFloat32_t
* foo(int x
, __SVFloat32_t
*ptrA
) {