diff options
| author | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-09-21 18:28:29 +0000 |
|---|---|---|
| committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-09-21 18:28:29 +0000 |
| commit | 0a3a22fe665fc86119cf94690c09d13c9a8b4818 (patch) | |
| tree | a8b496c9a837c2b3d259f2e81251006cfacd3452 /clang/test | |
| parent | 37a7151b1fb990f2f09c51757d661d1f957e4e44 (diff) | |
| download | bcm5719-llvm-0a3a22fe665fc86119cf94690c09d13c9a8b4818.tar.gz bcm5719-llvm-0a3a22fe665fc86119cf94690c09d13c9a8b4818.zip | |
In the OpenCL mode, the AltiVec mode must be off and checks must be strict
OpenCL is different from AltiVec in the way it supports vector literals. OpenCL
is strict with regards to semantic checks. For example, implicit conversions
and explicit casts between vectors of different types are disallowed.
Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com>
llvm-svn: 140270
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaOpenCL/vector_literals_invalid.cl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaOpenCL/vector_literals_invalid.cl b/clang/test/SemaOpenCL/vector_literals_invalid.cl index 957680f44ff..e4e23cd85f0 100644 --- a/clang/test/SemaOpenCL/vector_literals_invalid.cl +++ b/clang/test/SemaOpenCL/vector_literals_invalid.cl @@ -8,6 +8,6 @@ void vector_literals_invalid() { int4 a = (int4)(1,2,3); // expected-error{{too few elements}} int4 b = (int4)(1,2,3,4,5); // expected-error{{excess elements in vector}} - ((float4)(1.0f))++; // expected-error{{expression is not assignable}} + ((float4)(1.0f))++; // expected-error{{cannot increment value of type 'float4'}} int8 d = (int8)(a,(float4)(1)); // expected-error{{initializing 'int' with an expression of incompatible type 'float4'}} } |

