35 lines · c
1// REQUIRES: systemz-registered-target2// RUN: %clang_cc1 -target-cpu z17 -triple s390x-unknown-unknown \3// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s4 5typedef __attribute__((vector_size(16))) signed char vec_schar;6typedef __attribute__((vector_size(16))) signed short vec_sshort;7typedef __attribute__((vector_size(16))) signed int vec_sint;8typedef __attribute__((vector_size(16))) signed long long vec_slong;9typedef __attribute__((vector_size(16))) unsigned char vec_uchar;10typedef __attribute__((vector_size(16))) unsigned short vec_ushort;11typedef __attribute__((vector_size(16))) unsigned int vec_uint;12typedef __attribute__((vector_size(16))) unsigned long long vec_ulong;13typedef __attribute__((vector_size(16))) double vec_double;14 15volatile vec_schar vsc;16volatile vec_sshort vss;17volatile vec_sint vsi;18volatile vec_slong vsl;19volatile vec_uchar vuc;20volatile vec_ushort vus;21volatile vec_uint vui;22volatile vec_ulong vul;23volatile vec_double vd;24 25volatile unsigned int len;26const void * volatile cptr;27int cc;28 29void test_integer(void) {30 __builtin_s390_veval(vuc, vuc, vuc, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}31 __builtin_s390_veval(vuc, vuc, vuc, 256); // expected-error-re {{argument value {{.*}} is outside the valid range}}32 __builtin_s390_veval(vuc, vuc, vuc, len); // expected-error {{must be a constant integer}}33}34 35