aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/ext_vector_components.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-16 21:11:58 +0000
committerChris Lattner <sabre@nondot.org>2009-02-16 21:11:58 +0000
commit73525de7fd9bdd534382dc89a24f1f76db3e04b9 (patch)
treed7f67878553325ca2d681aaa3ed412c98bce6c9f /test/Sema/ext_vector_components.c
parent450da9832b31d9b2e90af7708d197e5b9e1af8c8 (diff)
enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/ext_vector_components.c')
-rw-r--r--test/Sema/ext_vector_components.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/ext_vector_components.c b/test/Sema/ext_vector_components.c
index d827c1e075..ad0277baac 100644
--- a/test/Sema/ext_vector_components.c
+++ b/test/Sema/ext_vector_components.c
@@ -7,7 +7,7 @@ typedef __attribute__(( ext_vector_type(4) )) float float4;
static void test() {
float2 vec2, vec2_2;
float3 vec3;
- float4 vec4, vec4_2;
+ float4 vec4, vec4_2, *vec4p;
float f;
vec2.z; // expected-error {{vector component access exceeds type 'float2'}}
@@ -32,4 +32,6 @@ 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'}}
+
+ vec4p->yz = vec4p->xy;
}