[Issue 24295] New: [betterC] ICE with new int[]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 21 17:53:39 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24295
Issue ID: 24295
Summary: [betterC] ICE with new int[]
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ice
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
```D
// REQUIRED_ARGS: -betterC
void f()
{
int[] overlaps = new int[1];
}
```
Trips an assert `assert(ne.lowering)` in e2ir.d:
```
core.exception.AssertError at src/dmd/e2ir.d(1253): Assertion failure
----------------
??:? _d_assertp [0x559cfda473d4]
src/dmd/e2ir.d:1253 dmd.backend.el.elem*
dmd.e2ir.toElem(dmd.expression.Expression, ref
dmd.toir.IRState).visitNew(dmd.expression.NewExp) [0x559cfd8da43c]
```
It's supposed to be lowered to a druntime template, but isn't because it's
betterC. GC operations are allowed for CTFE, but it should error when actually
trying to code gen.
--
More information about the Digitalmars-d-bugs
mailing list