https://issues.dlang.org/show_bug.cgi?id=22587
Issue ID: 22587
Summary: ternary with function call and assert(0) leads to cod1
assertion
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: backend
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
---
int front()
{
return empty ? 1 : assert(0);
}
bool empty()
{
return 0;
}
---
Yields: Assertion `retregs || !*pretregs' failed
Seems to crash LDC as well so maybe it's invalid code, that being said GDC
seems to do just fine.
--