blob: b933c87e4ad150161a0c9ec76ed675d1792ff0f3 [file] [edit]
// REQUIRES: any-device
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %t.out
#include <sycl/sycl.hpp>
class Test;
int main() {
sycl::queue q;
int *p = sycl::malloc_shared<int>(1, q);
*p = 0;
q.single_task<Test>([=]() { *p = 42; });
q.wait();
bool Failed = *p != 42;
sycl::free(p, q);
return Failed;
}