Bug 15998 – [REG2.067] Segmentation fault on const folding of arrays of static arrays

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-06T21:28:00Z
Last change time
2016-05-16T02:51:30Z
Keywords
ice, pull
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2016-05-06T21:28:50Z
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 by k.hara.pg — 2016-05-10T14:12:38Z
Comment #2 by github-bugzilla — 2016-05-11T00:02:56Z
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 by github-bugzilla — 2016-05-16T02:51:30Z
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