]> granicus.if.org Git - clang/commitdiff
Fix a non-conformant OpenCL test case.
authorJoey Gouly <joey.gouly@arm.com>
Thu, 24 Jan 2013 15:24:54 +0000 (15:24 +0000)
committerJoey Gouly <joey.gouly@arm.com>
Thu, 24 Jan 2013 15:24:54 +0000 (15:24 +0000)
Program scope variables must be declared in the constant address space
and are required to be initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173354 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaOpenCL/storageclass.cl

index c78e7cd436a3c9a8b4fee3ab904af68bbb438551..fdfe134621884ddf04af44ea82645688fd01b3c5 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
 
-static int A;
+static constant int A = 0;
 
 // static is not allowed at local scope.
 void kernel foo() {