1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc __attribute__((address_space(42))) 4*f4a2713aSLionel Sambuc const float withc = 1.0f; 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc __attribute__((address_space(42))) 7*f4a2713aSLionel Sambuc volatile float withv = 1.0f; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc __attribute__((address_space(42))) 10*f4a2713aSLionel Sambuc float nocv = 1.0f; 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc __attribute__((address_space(42))) 13*f4a2713aSLionel Sambuc float nocv_array[10] = { 1.0f }; 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc __attribute__((address_space(42))) 16*f4a2713aSLionel Sambuc int nocv_iarray[10] = { 4 }; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc __attribute__((address_space(9999))) 20*f4a2713aSLionel Sambuc 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]'}} 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc __attribute__((address_space(42))) int* __attribute__((address_space(42))) ptr_in_same_addr_space = nocv_iarray; 24*f4a2713aSLionel Sambuc __attribute__((address_space(42))) int* __attribute__((address_space(999))) ptr_in_different_addr_space = nocv_iarray; 25*f4a2713aSLionel Sambuc 26