[Issue 21957] ice when dmd computes the alignment of an union containing a noreturn

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 8 23:56:06 UTC 2021


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

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

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

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #13142 "Fix 21957 - Don't
crash when aligning noreturn members " fixing this issue:

- Fix 21957 - Don't crash when aligning noreturn members

  `alignmember` assumes that every type with default alignment has a size
  greater than zero - which obviously does not apply for `noreturn`.

  A `noreturn` field with default alignment does not affect the layout of
  the aggregate because `noreturn.sizeof = noreturn.alignof = 0`. Hence
  skip the `alignmember` call unless a custom alignment was requested.

https://github.com/dlang/dmd/pull/13142

--


More information about the Digitalmars-d-bugs mailing list