Skip to content

Commit

Permalink
Add regression test for sycl::vec compilation error in windows, debug
Browse files Browse the repository at this point in the history
  • Loading branch information
uditagarwal97 committed Jan 27, 2025
1 parent 1dbe403 commit 62bcf35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sycl/test/regression/vec_array_windows.cpp
Original file line number Diff line number Diff line change
@@ -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 <sycl/sycl.hpp>

// CHECK: error: SYCL kernel cannot call a variadic function
SYCL_EXTERNAL auto GetFirstElement(sycl::vec<int, 3> v) { return v[0]; }

0 comments on commit 62bcf35

Please sign in to comment.