]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Sema/invalid-assignment-constant-address-space.c
Vendor import of clang trunk r238337:
[FreeBSD/FreeBSD.git] / test / Sema / invalid-assignment-constant-address-space.c
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 }