125 lines · c
1// REQUIRES: systemz-registered-target2// RUN: %clang_cc1 -target-cpu z17 -triple s390x-linux-gnu \3// RUN: -fzvector -flax-vector-conversions=none \4// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s5 6#include <vecintrin.h>7 8volatile vector signed char vsc;9volatile vector signed short vss;10volatile vector signed int vsi;11volatile vector signed long long vsl;12volatile vector signed __int128 vslll;13volatile vector unsigned char vuc;14volatile vector unsigned short vus;15volatile vector unsigned int vui;16volatile vector unsigned long long vul;17volatile vector unsigned __int128 vulll;18volatile vector bool char vbc;19volatile vector bool short vbs;20volatile vector bool int vbi;21volatile vector bool long long vbl;22volatile vector bool __int128 vblll;23volatile vector double vd;24 25volatile signed char sc;26volatile signed short ss;27volatile signed int si;28volatile signed long long sl;29volatile unsigned char uc;30volatile unsigned short us;31volatile unsigned int ui;32volatile unsigned long long ul;33volatile double d;34 35const void * volatile cptr;36const signed char * volatile cptrsc;37const signed short * volatile cptrss;38const signed int * volatile cptrsi;39const signed long long * volatile cptrsl;40const unsigned char * volatile cptruc;41const unsigned short * volatile cptrus;42const unsigned int * volatile cptrui;43const unsigned long long * volatile cptrul;44const float * volatile cptrf;45const double * volatile cptrd;46 47void * volatile ptr;48signed char * volatile ptrsc;49signed short * volatile ptrss;50signed int * volatile ptrsi;51signed long long * volatile ptrsl;52unsigned char * volatile ptruc;53unsigned short * volatile ptrus;54unsigned int * volatile ptrui;55unsigned long long * volatile ptrul;56float * volatile ptrf;57double * volatile ptrd;58 59volatile unsigned int len;60volatile int idx;61int cc;62 63void test_integer(void) {64 vsc = vec_evaluate(vsc, vsc, vsc, idx); // expected-error {{no matching function}} \65 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \66 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}67 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}68 vuc = vec_evaluate(vuc, vuc, vuc, idx); // expected-error {{no matching function}} \69 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \70 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}71 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}72 vbc = vec_evaluate(vbc, vbc, vbc, idx); // expected-error {{no matching function}} \73 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \74 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}75 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}76 vss = vec_evaluate(vss, vss, vss, idx); // expected-error {{no matching function}} \77 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \78 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}79 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}80 vus = vec_evaluate(vus, vus, vus, idx); // expected-error {{no matching function}} \81 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \82 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}83 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}84 vbs = vec_evaluate(vbs, vbs, vbs, idx); // expected-error {{no matching function}} \85 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \86 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}87 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}88 vsi = vec_evaluate(vsi, vsi, vsi, idx); // expected-error {{no matching function}} \89 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \90 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}91 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}92 vui = vec_evaluate(vui, vui, vui, idx); // expected-error {{no matching function}} \93 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \94 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}95 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}96 vbi = vec_evaluate(vbi, vbi, vbi, idx); // expected-error {{no matching function}} \97 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \98 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}99 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}100 vsl = vec_evaluate(vsl, vsl, vsl, idx); // expected-error {{no matching function}} \101 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \102 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}103 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}104 vul = vec_evaluate(vul, vul, vul, idx); // expected-error {{no matching function}} \105 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \106 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}107 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}108 vbl = vec_evaluate(vbl, vbl, vbl, idx); // expected-error {{no matching function}} \109 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \110 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}111 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}112 vslll = vec_evaluate(vslll, vslll, vslll, idx); // expected-error {{no matching function}} \113 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \114 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}115 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}116 vulll = vec_evaluate(vulll, vulll, vulll, idx); // expected-error {{no matching function}} \117 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \118 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}119 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}120 vblll = vec_evaluate(vblll, vblll, vblll, idx); // expected-error {{no matching function}} \121 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \122 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}123 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}124}125