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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 13 13:17:28 UTC 2021


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

--- Comment #4 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #13164 "Merge stable" was merged into master:

- cde0e07730b7731b35408ded867ec7496bb826e2 by MoonlightSentinel:
  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/13164

--


More information about the Digitalmars-d-bugs mailing list