D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15998 - [REG2.067] Segmentation fault on const folding of arrays of static arrays
Summary: [REG2.067] Segmentation fault on const folding of arrays of static arrays
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2016-05-06 21:28 UTC by timon.gehr
Modified: 2016-05-16 02:51 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 timon.gehr 2016-05-06 21:28:50 UTC
The following code causes a segmentation fault in DMD 2.071.0.

immutable{
    string[2] foo=["",""];
    string[2][] bar=foo~baz;
}
auto baz(){
    immutable(string[2])[] r;
    return r;
}

No segmentation fault happens with DMD 2.060 (it incorrectly rejects the code as invalid).

The example should compile.
Comment 1 Kenji Hara 2016-05-10 14:12:38 UTC
https://github.com/dlang/dmd/pull/5760
Comment 2 github-bugzilla 2016-05-11 00:02:56 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3f911a1e9792352051a358307e8019e1ded425be
fix Issue 15998 - Segmentation fault on const folding of arrays of static arrays

https://github.com/dlang/dmd/commit/0c882efc9ea3ced4e3b0f58ad1c0329615a006f9
Merge pull request #5760 from 9rnsr/fix15998

[REG2.067] Issue 15998 - Segmentation fault on const folding of arrays of static arrays
Comment 3 github-bugzilla 2016-05-16 02:51:30 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3f911a1e9792352051a358307e8019e1ded425be
fix Issue 15998 - Segmentation fault on const folding of arrays of static arrays

https://github.com/dlang/dmd/commit/0c882efc9ea3ced4e3b0f58ad1c0329615a006f9
Merge pull request #5760 from 9rnsr/fix15998