Bug 17168 – Shift left operator causes segfault when compiling with -O flag
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-02-09T18:06:42Z
Last change time
2020-03-21T03:56:35Z
Assigned to
No Owner
Creator
Sophie
Comments
Comment #0 by meapineapple — 2017-02-09T18:06:42Z
Where test.d contains:
void fn(uint x){uint a = 0 << x;}
This works fine:
> dmd test.d -main
This does not:
> dmd test.d -main -O -inline
Segmentation fault: 11
This bug seems to only occur when both the -O and -inline compilation flags are present.
Comment #1 by meapineapple — 2017-02-09T18:09:49Z
Actually this occurs with the -O flag, independent of -inline
Comment #2 by github-bugzilla — 2017-02-11T23:12:09Z