Bug 22650 – [REG 2.097][ICE] cod4.d:424: Assertion 'cast(int)sz > 0' failed.

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-01-04T11:46:48Z
Last change time
2022-01-04T12:16:41Z
Keywords
backend, ice, ice-on-valid-code
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-01-04T11:46:48Z
--- 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.
Comment #1 by ibuclaw — 2022-01-04T12:13:20Z
PR that introduced issue. https://github.com/dlang/dmd/pull/12226
Comment #2 by moonlightsentinel — 2022-01-04T12:16:41Z
*** This issue has been marked as a duplicate of issue 21956 ***