blob: c61be69b5739ea7766abdd0d3e86937a4c56e61a [file] [log] [blame]
Tanya Lattnerb92ae0e2011-04-15 22:42:59 +00001// RUN: %clang_cc1 %s -emit-llvm -o %t
2
Tanya Lattnerb6385e82011-04-16 01:00:29 +00003typedef __attribute__((ext_vector_type(4))) unsigned char uchar4;
4typedef __attribute__((ext_vector_type(4))) unsigned int int4;
5typedef __attribute__((ext_vector_type(8))) unsigned char uchar8;
Tanya Lattnerb92ae0e2011-04-15 22:42:59 +00006
7// OpenCL allows vectors to be initialized by vectors Handle bug in
8// VisitInitListExpr for this case below.
Tanya Lattnerb6385e82011-04-16 01:00:29 +00009void foo( int4 v )
Tanya Lattnerb92ae0e2011-04-15 22:42:59 +000010{
Tanya Lattnerb6385e82011-04-16 01:00:29 +000011 uchar4 val[4] = {{(uchar4){((uchar8)(v.lo)).lo}}};
Tanya Lattnerb92ae0e2011-04-15 22:42:59 +000012}