Richard Smith | a7bd458 | 2015-05-22 01:14:39 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only |
2 | |||||
3 | #define OPENCL_CONSTANT 16776962 | ||||
4 | int __attribute__((address_space(OPENCL_CONSTANT))) c[3] = {0}; | ||||
5 | |||||
6 | void foo() { | ||||
7 | c[0] = 1; //expected-error{{read-only variable is not assignable}} | ||||
8 | } |