diff options
Diffstat (limited to 'test/Sema/ext_vector_components.c')
-rw-r--r-- | test/Sema/ext_vector_components.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Sema/ext_vector_components.c b/test/Sema/ext_vector_components.c index 48903024d3..8e42582cc7 100644 --- a/test/Sema/ext_vector_components.c +++ b/test/Sema/ext_vector_components.c @@ -26,8 +26,6 @@ static void test() { f = vec2.x; // legal, shorten f = vec4.xy.x; // legal, shorten - vec2 = vec3.hi; // expected-error {{vector component access invalid for odd-sized type 'float3'}} - vec4_2.xyzx = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} vec4_2.xyzz = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} vec4_2.xyyw = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} @@ -42,3 +40,8 @@ static void test() { vec4p->yz = vec4p->xy; } + +float2 lo(float3 x) { return x.lo; } +float2 hi(float3 x) { return x.hi; } +float2 ev(float3 x) { return x.even; } +float2 od(float3 x) { return x.odd; } |