Thread overview
[Issue 22632] Crash happens when CTFE compares an associative array to null using ==
[Issue 22632] Crash happens when CTFE compares a struct associative array member to null using == when initialization syntax used
Dec 27, 2021
wolframw
Dec 27, 2021
wolframw
Dec 27, 2021
Dlang Bot
Jan 01, 2022
Dlang Bot
December 27, 2021
https://issues.dlang.org/show_bug.cgi?id=22632

wolframw <wolframw@protonmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, ice-on-valid-code
                 CC|                            |wolframw@protonmail.com
           Hardware|x86_64                      |All
                 OS|Windows                     |All
           Severity|enhancement                 |normal

--- Comment #1 from wolframw <wolframw@protonmail.com> ---
This can be easily reproduced with an AA literal, no structs necessary: https://run.dlang.io/gist/32e6bbd4cd2b3c6e339234ec30ccfe92

It looks like CTFE doesn't cover comparisons of AA literals with null.

--
December 27, 2021
https://issues.dlang.org/show_bug.cgi?id=22632

wolframw <wolframw@protonmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Crash happens when CTFE     |Crash happens when CTFE
                   |compares a struct           |compares an associative
                   |associative array member to |array to null using ==
                   |null using == when          |
                   |initialization syntax used  |

--
December 27, 2021
https://issues.dlang.org/show_bug.cgi?id=22632

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

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

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@wolframw created dlang/dmd pull request #13465 "Fix issue 22632 - Crash happens when CTFE compares an associative arr…" fixing this issue:

- Fix issue 22632 - Crash happens when CTFE compares an associative array to null using ==

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

--
January 01, 2022
https://issues.dlang.org/show_bug.cgi?id=22632

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #13465 "Fix issue 22632 - Crash happens when CTFE compares an associative arr…" was merged into master:

- c238e37f54a937c416a586330e551306a7c74a2d by wolframw:
  Fix issue 22632 - Crash happens when CTFE compares an associative array to
null using ==

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

--