[Issue 23533] New: Segmentation fault accessing enum.max with -preview=nosharedaccess
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 2 03:10:19 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23533
Issue ID: 23533
Summary: Segmentation fault accessing enum.max with
-preview=nosharedaccess
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: andy.pj.hanson at gmail.com
To reproduce, just access `E.max` at least once, and an enum member other than
the first at least once.
The issue doesn't reproduce if the enum has only one member.
```
enum E { a, b }
void main() {
E x = E.b;
E y = E.max;
}
```
`dmd -preview=nosharedaccess a.d` causes a segmentation fault.
`dmd a.d` has no problem.
Tested with dmd v2.101.0.
--
More information about the Digitalmars-d-bugs
mailing list