builtins-systemz-zvector3-error.c 7.3 KB

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