Bug 20710 – ICE when statically accessing struct member containing empty array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-03-31T03:45:05Z
Last change time
2020-06-08T10:08:46Z
Keywords
pull
Assigned to
No Owner
Creator
andy.pj.hanson
Comments
Comment #0 by andy.pj.hanson — 2020-03-31T03:45:05Z
```
immutable A a = A(B([]));
immutable B b = a.b;
struct A {
B b;
}
struct B {
int[] c;
}
```
Compiling this code with `dmd app.d` results in:
`app.d(2): Error: Internal Compiler Error: null field b`
Tested with DMD v2.091.0 .
Comment #1 by dlang-bot — 2020-06-04T20:56:43Z
@BorisCarvajal created dlang/dmd pull request #11225 "Fix Issue 20710 - ICE when statically accessing struct member contain…" fixing this issue:
- Fix Issue 20710 - ICE when statically accessing struct member containing empty array
https://github.com/dlang/dmd/pull/11225
Comment #2 by dlang-bot — 2020-06-08T10:08:46Z
dlang/dmd pull request #11225 "Fix Issue 20710 - ICE when statically accessing struct member contain…" was merged into stable:
- cad8f7af5f37b631bf68115bf4faa89e89abbe64 by Boris Carvajal:
Fix Issue 20710 - ICE when statically accessing struct member containing empty array
https://github.com/dlang/dmd/pull/11225