[Issue 23763] ICE on operations involving zero-initialized structs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 8 12:48:57 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23763
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #14966 "Fix 23763: Correctly handle struct constants
with 0 initializer" was merged into stable:
- 21baff377725b8cdd702abf0ea148fa095a0a014 by Geod24:
Fix 23763: Correctly handle struct constants with 0 initializer
At the moment, in dsymbolsem.d:1026, there is the following comment:
```
/* If a struct is all zeros, as a special case
* set its initializer to the integer 0.
* In AssignExp::toElem(), we check for this and issue
* a memset() to initialize the struct.
* Must do same check in interpreter.
*/
```
Turns out, the 'Must do same check in interpreter.' part was missing.
https://github.com/dlang/dmd/pull/14966
--
More information about the Digitalmars-d-bugs
mailing list