convertvector.c 564 B

1234567891011121314151617
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. typedef double vector4double __attribute__((__vector_size__(32)));
  3. typedef float vector8float __attribute__((__vector_size__(32)));
  4. vector8float foo1(vector4double x) {
  5. return __builtin_convertvector(x, vector8float); // expected-error {{same number of elements}}
  6. }
  7. float foo2(vector4double x) {
  8. return __builtin_convertvector(x, float); // expected-error {{must be a vector type}}
  9. }
  10. vector8float foo3(double x) {
  11. return __builtin_convertvector(x, vector8float); // expected-error {{must be a vector}}
  12. }