1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 __attribute__((address_space(42)))
4 const float withc
= 1.0f
;
6 __attribute__((address_space(42)))
7 volatile float withv
= 1.0f
;
9 __attribute__((address_space(42)))
12 __attribute__((address_space(42)))
13 float nocv_array
[10] = { 1.0f
};
15 __attribute__((address_space(42)))
16 int nocv_iarray
[10] = { 4 };
19 __attribute__((address_space(9999)))
20 int* as_ptr
= nocv_iarray
; // expected-error{{cannot initialize a variable of type '__attribute__((address_space(9999))) int *' with an lvalue of type '__attribute__((address_space(42))) int[10]'}}
23 __attribute__((address_space(42))) int* __attribute__((address_space(42))) ptr_in_same_addr_space
= nocv_iarray
;
24 __attribute__((address_space(42))) int* __attribute__((address_space(999))) ptr_in_different_addr_space
= nocv_iarray
;