[Issue 17152] New: DMD segfaults because of struct with static const struct members
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 7 09:27:03 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17152
Issue ID: 17152
Summary: DMD segfaults because of struct with static const
struct members
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: meapineapple at gmail.com
DMD 2.072.0 crashes when compiling this program:
struct Test{
static const A = Test([1, 2, 3]);
static const B = Test([4, 5, 6]);
int[] x;
}
void main(){}
> dmd test.d
Segmentation fault: 11
Changing from const to immutable does not affect the error.
It works fine if one of the static const members are removed. It works fine if
the members are static enum instead of static const.
--
More information about the Digitalmars-d-bugs
mailing list