summaryrefslogtreecommitdiffstats
path: root/test/SemaOpenCL
diff options
context:
space:
mode:
authorPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2014-01-23 16:36:09 +0000
committerPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2014-01-23 16:36:09 +0000
commit4d04d7291ea543227cdfb58a843c5c37a80cb222 (patch)
treee9b7165ae85318c865c9df4f8ad77820de6722ec /test/SemaOpenCL
parent8b6b67238e3e73dc8f0e903ca7a73ae62acb8474 (diff)
Allow clang to compile the "extern" storage class in OpenCL 1.2.
The tests (forgot to svn add, sorry!). Patch from Fraser Cormack! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r--test/SemaOpenCL/extern.cl9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaOpenCL/extern.cl b/test/SemaOpenCL/extern.cl
new file mode 100644
index 0000000000..ee5e07237f
--- /dev/null
+++ b/test/SemaOpenCL/extern.cl
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -emit-llvm %s -o - -verify | FileCheck %s
+// expected-no-diagnostics
+
+// CHECK: @foo = external global float
+extern constant float foo;
+
+kernel void test(global float* buf) {
+ buf[0] += foo;
+}