[PATCH] D20090: [OPENCL] Fix wrongly vla error for OpenCL array.

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri May 27 08:28:48 PDT 2016


Anastasia added inline comments.

================
Comment at: test/CodeGenOpenCL/vla.cl:1
@@ +1,2 @@
+// RUN: %clang_cc1 -emit-llvm -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -DCL20 -o - %s | FileCheck %s --check-prefix=CL20
----------------
pxli168 wrote:
> Anastasia wrote:
> > pxli168 wrote:
> > > Anastasia wrote:
> > > > Could we have a Sema test instead where we accept the VLA if constant AS object is used and give an error otherwise?
> > > > 
> > > > Also do we need to test CL2.0? We don't seem to be doing anything different for that version. 
> > > In earier than OpenCL1.2  program scope variable must reside in constant address space and no
> > > ```
> > > const global int
> > > ```
> > > can be here.
> > > But const global value should also not be seen as VLA either.
> > Why not? Could you write a complete example perhaps? I am not sure I understand your point.
> > 
> > Thanks!
> Oh, I mean that in OpenCL 1.2 there will be some error message with
> ```
> const global int
> ```
> But I want to have a test with something that not only with the constant address space.
> Or what you suggest is that I make all the test in OpenCL 2.0?
Yes, I think this should be enough for testing your change.


http://reviews.llvm.org/D20090





More information about the cfe-commits mailing list