================
@@ -14,10 +14,14 @@ __device__ void func() {
__shared__ int too_large_arr[1073741824]; // expected-error
{{'int[1073741824]' is too large for the address space (maximum allowed size of
4'294'967'295 bytes)}}
}
+template <long long N> __device__ void dep_func() {
+ __shared__ char max_size_arr[N];
+ __shared__ char too_large_arr[N+1]; // expected-error {{'char[4294967296]'
is too large for the address space (maximum allowed size of 4'294'967'295
bytes)}}
+}
----------------
arsenm wrote:
Should also work if you used __attribute__((opencl_local)) or any of the other
address spaces
https://github.com/llvm/llvm-project/pull/180756
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits