Bug 19778 – ICE when accessing empty array at compile time
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-03-30T21:58:55Z
Last change time
2019-04-05T07:19:58Z
Keywords
pull
Assigned to
No Owner
Creator
Tim
Comments
Comment #0 by tim.dlang — 2019-03-30T21:58:55Z
The following code compiles with DMD 2.084.0, but not with DMD 2.085.0, 2.085.1-beta.1 or 2.085.0-master-0e9418f:
struct S
{
int[] data;
}
immutable X = S([]);
enum len = X.data.length;
void main()
{
}
Using DMD 2.085.0, 2.085.1-beta.1 or 2.085.0-master-0e9418f produces the following error:
test.d(6): Error: Internal Compiler Error: null field data
Comment #1 by razvan.nitu1305 — 2019-04-02T17:50:54Z
@RazvanN7 created dlang/dmd pull request #9547 "Fix Issue 19778 - ICE when accessing empty array at compile time" fixing this issue:
- Fix Issue 19778 - ICE when accessing empty array at compile time
https://github.com/dlang/dmd/pull/9547
Comment #3 by dlang-bot — 2019-04-03T09:43:36Z
dlang/dmd pull request #9547 "Fix Issue 19778 - ICE when accessing empty array at compile time" was merged into master:
- 6974776b1f16a281fdb2e73d76d3a2ec7f2ee30a by RazvanN7:
Fix Issue 19778 - ICE when accessing empty array at compile time
https://github.com/dlang/dmd/pull/9547
Comment #4 by dlang-bot — 2019-04-05T07:19:58Z
dlang/dmd pull request #9563 "[dmd-cxx] Fix Issue 19778 - ICE when accessing empty array at compile time" was merged into dmd-cxx:
- dda95a1bef25a7647016e863cb4d05f563e53749 by RazvanN7:
Fix Issue 19778 - ICE when accessing empty array at compile time
https://github.com/dlang/dmd/pull/9563