[Issue 23763] ICE on operations involving zero-initialized structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 8 00:29:37 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23763

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/dmd pull request #14966 "Fix 23763: Correctly handle
struct constants with 0 initializer" fixing this issue:

- 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