summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Frontend')
-rw-r--r--clang/test/Frontend/opencl.cl (renamed from clang/test/Frontend/opencl-blocks.cl)7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Frontend/opencl-blocks.cl b/clang/test/Frontend/opencl.cl
index b514efa7cfc..b0ff6967e12 100644
--- a/clang/test/Frontend/opencl-blocks.cl
+++ b/clang/test/Frontend/opencl.cl
@@ -6,6 +6,9 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.1 -fblocks -DBLOCKS
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.2 -fblocks -DBLOCKS
// RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only
+// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION11 %s
+// RUN: %clang_cc1 -cl-std=CL1.2 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION12 %s
+// RUN: %clang_cc1 -cl-std=CL2.0 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION20 %s
void f(void (^g)(void)) {
#ifdef __OPENCL_C_VERSION__
@@ -18,3 +21,7 @@ void f(void (^g)(void)) {
// expected-error@-8{{blocks support disabled - compile with -fblocks or pick a deployment target that supports them}}
#endif
}
+
+// CHECK-INVALID-OPENCL-VERSION11: warning: OpenCL version 1.1 does not support the option '-cl-strict-aliasing'
+// CHECK-INVALID-OPENCL-VERSION12: warning: OpenCL version 1.2 does not support the option '-cl-strict-aliasing'
+// CHECK-INVALID-OPENCL-VERSION20: warning: OpenCL version 2.0 does not support the option '-cl-strict-aliasing' \ No newline at end of file
OpenPOWER on IntegriCloud