Skip to content

Commit 417fcb1

Browse files
committed
fix wrong test
1 parent 2fd879e commit 417fcb1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sycl/test-e2e/AddressSanitizer/nullpointer/global_nullptr.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@
1515

1616
int main() {
1717
sycl::queue Q;
18-
constexpr std::size_t N = 4;
18+
constexpr std::size_t N = 2;
1919
int *array = nullptr;
2020

2121
Q.submit([&](sycl::handler &h) {
2222
h.parallel_for<class MyKernel>(
23-
sycl::nd_range<1>(N, 1), [=](sycl::nd_item<1> item) {
24-
auto private_array =
25-
sycl::ext::oneapi::experimental::static_address_cast<
26-
sycl::access::address_space::private_space>(array);
27-
private_array[0] = 0;
28-
});
23+
sycl::nd_range<1>(N, 1), [=](sycl::nd_item<1> item) { array[0] = 0; });
2924
Q.wait();
3025
});
3126
// CHECK: ERROR: DeviceSanitizer: null-pointer-access on Unknown Memory

0 commit comments

Comments
 (0)