[llvm-bugs] [Bug 25764] New: isa<> used on a null pointer in CodeGenPrepare::dupRetToEnableTailCallOpts
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 7 06:16:08 PST 2015
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: unassignedbugs at nondot.org
Reporter: yaron.keren at gmail.com
CC: benny.kra at gmail.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151207/23324594/attachment.html>
More information about the llvm-bugs
mailing list