<div dir="ltr">C++ source, compiled as clang++ --target=amdgcn-amd-amdhsa<div><br></div><div>struct t<br>{<br>  int v;<br>};<div>__attribute__((address_space(3))) t d;<br><div><br></div></div><div>// error: no matching constructor for initialization of '__attribute__((address_space(3)))</div><div><br></div><div>with  t() : v(0) {}, same error</div><div><br></div><div>with  t() __attribute__((address_space(3))) : v(0) {},</div><div>// error: function type may not be qualified with an address space</div><div><br></div><div>How should I be spelling this? I'm essentially trying to replicate cuda's __shared__. Ideally I'd like implicit conversions to a and from an int which is not address space qualified, but right now I'm stuck on the constructor.</div></div><div><br></div><div>Thanks,</div><div><br></div><div>Jon</div></div>