Bug 14992 – static array local variables always require .init

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-01T09:28:00Z
Last change time
2016-03-19T20:21:53Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
dlang-bugzilla
Blocks
14918

Comments

Comment #0 by dlang-bugzilla — 2015-09-01T09:28:03Z
//// a.d //// import b; void main() { S[1] arr; } //// b.d //// struct S {} ///////////// This doesn't link: Error 42: Symbol Undefined _D1b1S6__initZ Using individual (non-array) variables of type S, as well as making the array static, seem to fix the linker error.
Comment #1 by k.hara.pg — 2015-09-01T15:21:10Z
Comment #2 by k.hara.pg — 2015-09-14T03:10:59Z
*** Issue 14014 has been marked as a duplicate of this issue. ***
Comment #3 by github-bugzilla — 2016-02-07T02:21:13Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e2be39899a71f1d82d8d23ebf52c97f8efb13485 fix Issue 14992 - static array local variables always require .init Add one more special case for static array of struct initialization with zero, similar to the special case for struct initialization. https://github.com/D-Programming-Language/dmd/commit/8388211efea46340e1ada6b3b889452efd40ccd5 Merge pull request #5014 from 9rnsr/fix14992 Issue 14992 - static array local variables always require .init
Comment #4 by github-bugzilla — 2016-03-19T20:21:53Z