```D
// REQUIRED_ARGS: -betterC
void f()
{
int[] overlaps = new int[1];
}
```
Trips an assert `assert(ne.lowering)` in e2ir.d:
```
core.exception.AssertError@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.
Comment #1 by dlang-bot — 2024-01-02T11:46:02Z
@RazvanN7 created dlang/dmd pull request #15982 "Fix Issue 24295 - [betterC] ICE with new int[]" fixing this issue:
- Fix Issue 24295 - [betterC] ICE with new int[]
https://github.com/dlang/dmd/pull/15982
Comment #2 by dlang-bot — 2024-01-03T17:32:52Z
dlang/dmd pull request #15982 "Fix Issue 24295 - [betterC] ICE with new int[]" was merged into stable:
- 0eb4ea8c48af9c439928b7470b5ecd6c55e3793d by RazvanN7:
Fix Issue 24295 - [betterC] ICE with new int[]
https://github.com/dlang/dmd/pull/15982
Comment #3 by dlang-bot — 2024-01-04T22:34:44Z
dlang/dmd pull request #15998 "Merge stable" was merged into master:
- eee039689df48ff4fe063b252e2b9b501cc410a3 by RazvanN7:
Fix Issue 24295 - [betterC] ICE with new int[]
https://github.com/dlang/dmd/pull/15998