Bug 20319 – cast causing illegal instruction (core dump) in compiler

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-10-25T05:28:15Z
Last change time
2020-03-21T03:56:37Z
Keywords
ice
Assigned to
No Owner
Creator
Bartek Siudeja

Comments

Comment #0 by siudej — 2019-10-25T05:28:15Z
test on run.dlang.io no compiler arguments all dmd versions code: ``` void main() { auto data = cast(const char[5][]) "qwert"; } ``` output: ``` Up to 2.085.1: Success and no output Since 2.086.1: Status -4 and no output ``` Nightly gives `output: Illegal instruction (core dumped)`.
Comment #1 by siudej — 2019-10-25T05:32:56Z
Comment #2 by siudej — 2019-10-25T15:54:40Z
Maybe a nicer way to reproduce, pointing at handling of strings: ``` auto data = cast(const int[]) "qwer"; // not OK auto data2 = cast(const int[]) "qwer".dup; // OK ```
Comment #3 by b2.temp — 2019-12-12T00:55:17Z
*** This issue has been marked as a duplicate of issue 20130 ***