Changes behavior introduced in r298369 to only error out on vector component invalid length access on OpenCL mode. Differential Revision: https://reviews.llvm.org/D38868 rdar://problem/33568748 llvm-svn: 316016
11 lines
401 B
Common Lisp
11 lines
401 B
Common Lisp
// 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}}
|
|
}
|