[PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

Martin Böhme via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 05:39:07 PDT 2016


mboehme added a subscriber: mboehme.
mboehme added a comment.

The test cfe/trunk/test/Frontend/opencl.cl that was added here appears to
fail.

Running "ninja check-clang" doesn't pick this up because
cfe/trunk/test/Frontend/lit.local.cfg doesn't contain '.cl' as a file
suffix:

config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll']

As soon as I add the suffix:

config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll', '.cl']

the test fails. The failure seems to happen because of the new
"CHECK_INVALID_OPENCL_VERSION" checks. For OpenCL versions 1.1 and 1.2,
compilation fails for these checks because of the expected error "blocks
support disabled".

A solution seems to be to add "-fblocks" to the command line for these two
checks.

I'll be sending a patch with this fix out for review shortly.


Repository:
  rL LLVM

https://reviews.llvm.org/D22170





More information about the cfe-commits mailing list