Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Fix undefined behaviour in vector printf specifier #1684

Open
wants to merge 1 commit into
base: intel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SYCL/DeviceLib/built-ins/printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int main() {
// On SPIRV devices, vectors can be printed via native OpenCL types:
using ocl_int4 = sycl::vec<int, 4>::vector_t;
{
static const CONSTANT char format[] = "%v4d\n";
static const CONSTANT char format[] = "%v4hld\n";
ext::oneapi::experimental::printf(format, (ocl_int4)v4);
}

Expand Down