clang::CodeGen::CGBuilderTy::CreateStructGEP crash: Assertion `Idx < NumElements && "Invalid element idx!"' failed. (llvm/IR/DataLayout.h) #59223
Open
Description
I'm experiencing a crash in
clang++: llvm-project/llvm/include/llvm/IR/DataLayout.h:653:
uint64_t llvm::StructLayout::getElementOffset(unsigned int) const:
Assertion `Idx < NumElements && "Invalid element idx!"' failed.According to "How to submit an LLVM bug report" this seems to be a "middle-end optimization bug" - test-case.bc.gz attached.
clang version 15.0.6 (https://github.com/llvm/llvm-project.git e6e61e9b2ef7c0fa3fe2cd7c612e00ecf57a9dd8)
Target: x86_64-unknown-linux-gnu(applies to any prior 15.* version, too)
Note: one peculiarity I use during compilation is the option --unsigned-char on a x86-64 system.
Activity