Skip to content

[Clang][Sema] Unreachable executed when using opencl_generic attribute in SYCL #152460

@Maetveis

Description

@Maetveis

The following code, when compiled with clang -fsycl test.cpp

// test.cpp
int [[clang::opencl_generic]] *a;

makes clang crash with the message:

Invalid address space
UNREACHABLE executed at /root/llvm-project/llvm/tools/clang/lib/Sema/SemaType.cpp:6577!

See it on Compiler Explorer

Clang should not crash, it should either accept or reject the input with a proper message.

Metadata

Metadata

Assignees

Labels

SYCLhttps://registry.khronos.org/SYCLclang:frontendLanguage frontend issues, e.g. anything involving "Sema"crash-on-valid

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions