D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20319 - cast causing illegal instruction (core dump) in compiler
Summary: cast causing illegal instruction (core dump) in compiler
Status: RESOLVED DUPLICATE of issue 20130
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2019-10-25 05:28 UTC by Bartek Siudeja
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Bartek Siudeja 2019-10-25 05:28:15 UTC
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 Bartek Siudeja 2019-10-25 05:32:56 UTC
Perhaps this is related to https://issues.dlang.org/show_bug.cgi?id=20318
Comment 2 Bartek Siudeja 2019-10-25 15:54:40 UTC
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 basile-z 2019-12-12 00:55:17 UTC

*** This issue has been marked as a duplicate of issue 20130 ***