• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
2// expected-no-diagnostics
3
4typedef int int2 __attribute((ext_vector_type(2)));
5typedef int int3 __attribute((ext_vector_type(3)));
6typedef int int4 __attribute((ext_vector_type(4)));
7
8__constant int4 i_1_1_1_1 = (int4)(1,2,3,4);
9__constant int4 i_2_1_1 = (int4)((int2)(1,2),3,4);
10__constant int4 i_1_2_1 = (int4)(1,(int2)(2,3),4);
11__constant int4 i_1_1_2 = (int4)(1,2,(int2)(3,4));
12__constant int4 i_2_2 = (int4)((int2)(1,2),(int2)(3,4));
13__constant int4 i_3_1 = (int4)((int3)(1,2,3),4);
14__constant int4 i_1_3 = (int4)(1,(int3)(2,3,4));
15
16typedef float float2 __attribute((ext_vector_type(2)));
17typedef float float3 __attribute((ext_vector_type(3)));
18typedef float float4 __attribute((ext_vector_type(4)));
19
20__constant float4 f_1_1_1_1 = (float4)(1,2,3,4);
21__constant float4 f_2_1_1 = (float4)((float2)(1,2),3,4);
22__constant float4 f_1_2_1 = (float4)(1,(float2)(2,3),4);
23__constant float4 f_1_1_2 = (float4)(1,2,(float2)(3,4));
24__constant float4 f_2_2 = (float4)((float2)(1,2),(float2)(3,4));
25__constant float4 f_3_1 = (float4)((float3)(1,2,3),4);
26__constant float4 f_1_3 = (float4)(1,(float3)(2,3,4));
27
28