summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-06-25 21:06:09 +0000
committerNate Begeman <natebegeman@mac.com>2009-06-25 21:06:09 +0000
commit0359e1220865450dbacb7565b8b3a5fd0000b1fe (patch)
treeff77ff64d53dd5a6b975ef576d2ec757cdc5a828 /clang/test
parent188e87fa2148939985eea5826ca8804cc41b44c8 (diff)
downloadbcm5719-llvm-0359e1220865450dbacb7565b8b3a5fd0000b1fe.tar.gz
bcm5719-llvm-0359e1220865450dbacb7565b8b3a5fd0000b1fe.zip
OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index.
llvm-svn: 74202
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/ext_vector_components.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/ext_vector_components.c b/clang/test/Sema/ext_vector_components.c
index 422a9e6f228..a5d270074ad 100644
--- a/clang/test/Sema/ext_vector_components.c
+++ b/clang/test/Sema/ext_vector_components.c
@@ -3,11 +3,13 @@
typedef __attribute__(( ext_vector_type(2) )) float float2;
typedef __attribute__(( ext_vector_type(3) )) float float3;
typedef __attribute__(( ext_vector_type(4) )) float float4;
+typedef __attribute__(( ext_vector_type(16) )) float float16;
static void test() {
float2 vec2, vec2_2;
float3 vec3;
float4 vec4, vec4_2, *vec4p;
+ float16 vec16;
float f;
vec2.z; // expected-error {{vector component access exceeds type 'float2'}}
@@ -16,6 +18,7 @@ static void test() {
vec4.xyzc; // expected-error {{illegal vector component name 'c'}}
vec4.s01z; // expected-error {{illegal vector component name 'z'}}
vec2 = vec4.s01; // legal, shorten
+ vec2 = vec4.S01; // legal, shorten
vec3 = vec4.xyz; // legal, shorten
f = vec2.x; // legal, shorten
@@ -32,6 +35,8 @@ static void test() {
vec4 = (float4){ 1,2,3,4 };
vec4.xy.w; // expected-error {{vector component access exceeds type 'float2'}}
vec4.s06; // expected-error {{vector component access exceeds type 'float4'}}
+ vec4.x = vec16.sf;
+ vec4.x = vec16.sF;
vec4p->yz = vec4p->xy;
}
OpenPOWER on IntegriCloud