https://llvm.org/bugs/show_bug.cgi?id=25764
Bug ID: 25764 Summary: isa<> used on a null pointer in CodeGenPrepare::dupRetToEnableTailCallOpts Product: new-bugs Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: yaron.ke...@gmail.com CC: benny....@gmail.com, llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15407 --> https://llvm.org/bugs/attachment.cgi?id=15407&action=edit creduced example compiling #include <list> #include <vector> using namespace std; int main() { list<int> c1; vector<list<int>> cc; cc.insert(cc.begin(), {c1}); } with >clang -O -g -target x86_64-pc-windows -fexceptions lexicomp1.cpp results in Assertion failed: Val && "isa<> used on a null pointer" originating from the dyn_cast bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB) { if (!TLI) return false; ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator()); where BB->getTerminator() is nullptr. This could be fixed with dyn_cast_or_null but I don't know if this is correct or if a nullptr BB->getTerminator() indicates a real problem which should be fixed elsewhere. Also attached is reduced example, as far as creduce could go (77 lines, no external includes) if it is any help. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs