Skip to content

Commit 2d97c28

Browse files
[SYCL] Add regression test for use of std::array in sycl::vec constructor (#17945)
Regression test for CMPLRLLVM-66787
1 parent ac89277 commit 2d97c28

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: sycl/test/regression/std_array_vec_constructor.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Test to isolate sycl::vec bug due to use of std::array in
2+
// the constructor.
3+
// REQUIRES: windows
4+
5+
// RUN: not %clangxx -O0 -fsycl -D_DEBUG -shared %s &> %t.compile.log
6+
// RUN: FileCheck %s -input-file=%t.compile.log
7+
8+
#include <sycl/sycl.hpp>
9+
10+
using namespace sycl::ext::oneapi::experimental;
11+
12+
// CHECK: UnsupportedVarArgFunction: Variadic functions other than 'printf' are not supported in SPIR-V.
13+
// CHECK: clang{{.*}} error: llvm-spirv command failed with exit code 23{{.*}}
14+
auto Reproducer(sycl::queue q, sampled_image_handle imgHanlde) {
15+
return q.submit([&](sycl::handler &cg) {
16+
cg.parallel_for(
17+
sycl::nd_range<3>({1, 1, 1}, {1, 1, 1}), [=](sycl::nd_item<3> item) {
18+
[[maybe_unused]] auto val =
19+
sample_image<unsigned char>(imgHanlde, sycl::float2(1, 2));
20+
});
21+
});
22+
}

0 commit comments

Comments
 (0)