[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / address-space-initialize.cpp
blobbd5ee926f5b6b8af8df21498570728ce64520e30
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)))
10 float nocv = 1.0f;
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;