clspv
clspv copied to clipboard
Assertion in clang when referring to a structure type that doesn't exist
Trying to compile the following code:
kernel void test(global struct nope* arg) {}
leads to the following assertion
clspv: clspv/third_party/clang/lib/AST/RecordLayoutBuilder.cpp:2987: const clang::ASTRecordLayout& clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*) const: Assertion `D && "Cannot get layout of forward declarations!"' failed.
Abandon
This is coming from the layout checks in the frontend. If I remove those clspv aborts later in the flow.
Still failing here. Why did you close this?
hum, I was compiling with a clvk-like compile line, and it was not failing.
This is passing compiling with clspv -rewrite-packed-structs
This is because of the code in FrontendPlugin.cpp that is only checking the support for the layout when this pass is not used.