aboutsummaryrefslogtreecommitdiff
path: root/test/SemaOpenCL/extern.cl
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
commit9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch)
tree47df2c12b57214af6c31e47404b005675b8b7ffc /test/SemaOpenCL/extern.cl
parentf73d5f23a889b93d89ddef61ac0995df40286bb8 (diff)
downloadsrc-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.tar.gz
src-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.zip
Notes
Diffstat (limited to 'test/SemaOpenCL/extern.cl')
-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 000000000000..ee5e07237f06
--- /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;
+}