test.cl:2:17: error: incompatible integer to pointer conversion initializing '__global int *__private' with an expression of type 'bool' [-Wint-conversion] 2 | __global int *ag = __builtin_assume_aligned(g, 16); | ^ ~~~~~~ clang: /home/faritter/playground/llvm/llvm-project/llvm/lib/IR/Instructions.cpp:2974: static llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::InsertPosition): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: ./build/bin/clang -c test.cl 1. parser at end of file 2. test.cl:1:6: LLVM IR generation of declaration 'f' 3. test.cl:1:6: Generating code for declaration 'f' #0 0x000056e464acc7ff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/faritter/playground/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:802:3 #1 0x000056e464aca35f llvm::sys::RunSignalHandlers() /home/faritter/playground/llvm/llvm-project/llvm/lib/Support/Signals.cpp:105:20 #2 0x000056e464a25958 HandleCrash /home/faritter/playground/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5 #3 0x000056e464a25958 CrashRecoverySignalHandler(int) /home/faritter/playground/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:62 #4 0x000072714c642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #5 0x000072714c6969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76 #6 0x000072714c6969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10 #7 0x000072714c6969fc pthread_kill ./nptl/pthread_kill.c:89:10 #8 0x000072714c642476 gsignal ./signal/../sysdeps/posix/raise.c:27:6 #9 0x000072714c6287f3 abort ./stdlib/abort.c:81:7 #10 0x000072714c62871b _nl_load_domain ./intl/loadmsgcat.c:1177:9 #11 0x000072714c639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96) #12 0x000056e46442de41 (./build/bin/clang+0x238be41) #13 0x000056e4636a9852 llvm::IRBuilderBase::CreateCast(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, llvm::Twine const&, llvm::MDNode*, llvm::FMFSource) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2193:0 #14 0x000056e4636a9852 llvm::IRBuilderBase::CreateIntCast(llvm::Value*, llvm::Type*, bool, llvm::Twine const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2231:0 #15 0x000056e464e2f677 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:2574:44 #16 0x000056e464e2c104 Visit /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:449:3 #17 0x000056e464e2c104 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:5591:13 #18 0x000056e465302edf clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:773:40 #19 0x000056e46530401c clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:2025:5 #20 0x000056e46530e6cd clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission const&) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:1984:26 #21 0x000056e46531189d clang::CodeGen::CodeGenFunction::EmitAutoVarDecl(clang::VarDecl const&) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:1326:22 #22 0x000056e46531189d clang::CodeGen::CodeGenFunction::EmitVarDecl(clang::VarDecl const&) (.part.0) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:219:25 #23 0x000056e465311d36 clang::Decl::getKind() const /home/faritter/playground/llvm/llvm-project/clang/include/clang/AST/DeclBase.h:445:51 #24 0x000056e465311d36 clang::DecompositionDecl::classof(clang::Decl const*) /home/faritter/playground/llvm/llvm-project/clang/include/clang/AST/DeclCXX.h:4227:58 #25 0x000056e465311d36 llvm::isa_impl::doit(clang::VarDecl const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:64:64 #26 0x000056e465311d36 llvm::isa_impl_cl::doit(clang::VarDecl const*) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:110:36 #27 0x000056e465311d36 llvm::isa_impl_wrap::doit(clang::VarDecl const* const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:137:41 #28 0x000056e465311d36 llvm::isa_impl_wrap::doit(clang::VarDecl const* const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:129:13 #29 0x000056e465311d36 llvm::CastIsPossible::isPossible(clang::VarDecl const* const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:257:62 #30 0x000056e465311d36 llvm::CastInfo::doCastIfPossible(clang::VarDecl const* const&) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:493:26 #31 0x000056e465311d36 decltype(auto) llvm::dyn_cast(clang::VarDecl const*) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:663:48 #32 0x000056e465311d36 clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGDecl.cpp:165:47 #33 0x000056e464ef0307 clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGStmt.cpp:1632:32 #34 0x000056e464f06e55 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGStmt.cpp:532:10 #35 0x000056e464efd469 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGStmt.cpp:65:3 #36 0x000056e464f0678c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CGStmt.cpp:560:31 #37 0x000056e464f6cef0 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1360:33 #38 0x000056e464f82ed4 clang::CodeGen::CodeGenModule::getLangOpts() const /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.h:805:51 #39 0x000056e464f82ed4 clang::CodeGen::CodeGenFunction::getLangOpts() const /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.h:2156:66 #40 0x000056e464f82ed4 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1596:18 #41 0x000056e464fdd315 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:6115:3 #42 0x000056e464fd7e2d clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4243:47 #43 0x000056e464fd86f3 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:3955:27 #44 0x000056e464fe117a clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:7003:37 #45 0x000056e4653b017e (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:189:67 #46 0x000056e4653a1561 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) /home/faritter/playground/llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:171:22 #47 0x000056e466e42b24 clang::ParseAST(clang::Sema&, bool, bool) /home/faritter/playground/llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:175:17 #48 0x000056e46563e1a9 clang::FrontendAction::Execute() /home/faritter/playground/llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1076:38 #49 0x000056e4655d2bdd llvm::Error::setChecked(bool) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Error.h:310:22 #50 0x000056e4655d2bdd llvm::Error::operator bool() /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/Support/Error.h:242:15 #51 0x000056e4655d2bdd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/faritter/playground/llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1056:42 #52 0x000056e46570f803 std::__shared_ptr::get() const /usr/include/c++/11/bits/shared_ptr_base.h:1296:16 #53 0x000056e46570f803 std::__shared_ptr_access::_M_get() const /usr/include/c++/11/bits/shared_ptr_base.h:993:69 #54 0x000056e46570f803 std::__shared_ptr_access::operator*() const /usr/include/c++/11/bits/shared_ptr_base.h:979:2 #55 0x000056e46570f803 clang::CompilerInvocation::getFrontendOpts() /home/faritter/playground/llvm/llvm-project/clang/include/clang/Frontend/CompilerInvocation.h:259:48 #56 0x000056e46570f803 clang::CompilerInstance::getFrontendOpts() /home/faritter/playground/llvm/llvm-project/clang/include/clang/Frontend/CompilerInstance.h:313:39 #57 0x000056e46570f803 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/faritter/playground/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:297:29 #58 0x000056e463001317 cc1_main(llvm::ArrayRef, char const*, void*) /home/faritter/playground/llvm/llvm-project/clang/tools/driver/cc1_main.cpp:290:40 #59 0x000056e462ff9cdc ExecuteCC1Tool(llvm::SmallVectorImpl&, llvm::ToolContext const&) /home/faritter/playground/llvm/llvm-project/clang/tools/driver/driver.cpp:218:20 #60 0x000056e4653f2fad operator() /home/faritter/playground/llvm/llvm-project/clang/lib/Driver/Job.cpp:437:32 #61 0x000056e4653f2fad void llvm::function_ref::callback_fn>, std::__cxx11::basic_string, std::allocator>*, bool*) const::'lambda'()>(long) /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:52 #62 0x000056e464a25ad0 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) /home/faritter/playground/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:427:10 #63 0x000056e4653f3a1e clang::driver::CC1Command::Execute(llvm::ArrayRef>, std::__cxx11::basic_string, std::allocator>*, bool*) const (.part.0) /home/faritter/playground/llvm/llvm-project/clang/lib/Driver/Job.cpp:441:10 #64 0x000056e4653b6b7b clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /home/faritter/playground/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:197:3 #65 0x000056e4653b72c6 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl>&, bool) const /home/faritter/playground/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:251:5 #66 0x000056e4653c23f4 llvm::SmallVectorBase::empty() const /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:81:46 #67 0x000056e4653c23f4 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl>&) /home/faritter/playground/llvm/llvm-project/clang/lib/Driver/Driver.cpp:2190:28 #68 0x000056e462ffd477 llvm::SmallVectorBase::size() const /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:78:32 #69 0x000056e462ffd477 llvm::SmallVectorTemplateCommon, void>::end() /home/faritter/playground/llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:269:41 #70 0x000056e462ffd477 clang_main(int, char**, llvm::ToolContext const&) /home/faritter/playground/llvm/llvm-project/clang/tools/driver/driver.cpp:400:26 #71 0x000056e462f164eb main /home/faritter/playground/llvm/build/tools/clang/tools/driver/clang-driver.cpp:18:1 #72 0x000072714c629d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #73 0x000072714c629e40 call_init ./csu/../csu/libc-start.c:128:20 #74 0x000072714c629e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #75 0x000056e462ff8f95 _start (./build/bin/clang+0xf56f95) clang: error: clang frontend command failed with exit code 134 (use -v to see invocation) clang version 20.0.0git (git@github.com:llvm/llvm-project.git c25bd6e35134f591ee7dfeb4494df02987106f7e) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/faritter/playground/llvm/build/bin Build config: +assertions clang: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/test-ff43fa.cl clang: note: diagnostic msg: /tmp/test-ff43fa.sh clang: note: diagnostic msg: ********************