summaryrefslogtreecommitdiff
path: root/test/SemaOpenCL/vector_swizzle_length.cl
blob: 4dbb5bd76ee0a7cd4309b746841c1dbc32df15d9 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 -x cl %s -verify -pedantic -fsyntax-only

typedef float float8 __attribute__((ext_vector_type(8)));

void foo() {
    float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0);

    f2.s01234; // expected-error {{vector component access has invalid length 5.  Supported: 1,2,3,4,8,16}}
    f2.xyzxy; // expected-error {{vector component access has invalid length 5.  Supported: 1,2,3,4,8,16}}
}