From 62bcf3539c974e6e21739ed615e5a69c989ab5e6 Mon Sep 17 00:00:00 2001 From: Agarwal Date: Mon, 27 Jan 2025 11:41:46 -0800 Subject: [PATCH] Add regression test for sycl::vec compilation error in windows, debug --- sycl/test/regression/vec_array_windows.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sycl/test/regression/vec_array_windows.cpp diff --git a/sycl/test/regression/vec_array_windows.cpp b/sycl/test/regression/vec_array_windows.cpp new file mode 100644 index 0000000000000..93247196eb59f --- /dev/null +++ b/sycl/test/regression/vec_array_windows.cpp @@ -0,0 +1,14 @@ +// Test to isolate sycl::vec regression after +// https://github.com/intel/llvm/pull/14130. This PR caused sycl::vec to use +// std::array as its underlying storage. However, operations on std::array +// may emit debug-mode-only functions, on which the device compiler may fail. +// Examples of such failure: CMPLRLLVM-52910, CMPLRLLVM-64902. + +// REQUIRES: windows + +// RUN: not %clangxx -fsycl -D_DEBUG -I %sycl_include %s -fsycl-device-only 2>&1 | FileCheck %s + +#include + +// CHECK: error: SYCL kernel cannot call a variadic function +SYCL_EXTERNAL auto GetFirstElement(sycl::vec v) { return v[0]; }