bader added a subscriber: bader.

================
Comment at: test/SemaOpenCL/ternary-implicit-casts.cl:10-11
@@ +9,4 @@
+kernel void implicit_cast_generic(global int* gint, local int* lint, int cond) 
{
+       // will compile, ptr is generic and can accept global and local
+       int* ptr = cond ? gint : lint; // expected-warning {{pointer type 
mismatch ('__global int *' and '__local int *')}}
+} 
----------------
Note that test doesn't specify OpenCL version. By default it's 1.0, so ptr 
points to private AS and it's illegal to cast pointers from different address 
spaces in OpenCL v1.x.


http://reviews.llvm.org/D16682



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to