www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22650] New: [REG 2.097][ICE] cod4.d:424: Assertion

https://issues.dlang.org/show_bug.cgi?id=22650

          Issue ID: 22650
           Summary: [REG 2.097][ICE] cod4.d:424: Assertion 'cast(int)sz >
                    0' failed.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

---
void test()
{
    auto x = assert(false);
}
---
Results in:
---
dmd: src/dmd/backend/cod4.d:424: Assertion `cast(int)sz > 0' failed.
Aborted (core dumped)
---

Regression because this became valid starting with the introduction of
noreturn.

Issue 22638 also asserts in the same location, and that points to a regression
introduced by 2.096.

--
Jan 04 2022