digitalmars.D.bugs - [Issue 22587] New: ternary with function call and assert(0) leads to
- d-bugmail puremagic.com (29/29) Dec 11 2021 https://issues.dlang.org/show_bug.cgi?id=22587
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: nobody puremagic.com Reporter: maxhaton gmail.com --- 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. --
Dec 11 2021