D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17285 - Segfault when types are used in array literals
Summary: Segfault when types are used in array literals
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ice, ice-on-invalid-code, pull
Depends on:
Blocks:
 
Reported: 2017-03-29 19:47 UTC by kinke
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kinke 2017-03-29 19:47:44 UTC
Crashes with DMD 2.073.2 (but at least prints an error message before that):

enum SETTINGS_THEME_VARIANT_KEY;

void foo() {
    foreach(key; [SETTINGS_THEME_VARIANT_KEY, 1]) {}
}
Comment 1 basile-z 2019-03-02 10:24:13 UTC
This happens with any type actually, when it tries to find the common type.
Comment 2 Dlang Bot 2019-03-02 10:40:40 UTC
@Basile-z created dlang/dmd pull request #9404 "fix issue 17285 - Segfault when types are used in array literals" fixing this issue:

- fix issue 17285 - Segfault when types are used in array literals

https://github.com/dlang/dmd/pull/9404
Comment 3 Dlang Bot 2019-03-02 16:09:21 UTC
dlang/dmd pull request #9404 "fix issue 17285 - Segfault when types are used in array literals" was merged into master:

- 7204ca1bf54f744d8ac4c56834bdc727fa2bb944 by Basile Burg:
  fix issue 17285 - Segfault when types are used in array literals

https://github.com/dlang/dmd/pull/9404
Comment 4 Dlang Bot 2019-06-16 20:57:30 UTC
dlang/dmd pull request #10046 "[dmd-cxx] Backport semanticRun refactoring and recursive semantic SEGV bug fixes" was merged into dmd-cxx:

- 92380066e181b0db4e64f7be65bf357430df8874 by Basile Burg:
  fix issue 17285 - Segfault when types are used in array literals

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