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
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dec45d735143737b499f9ce105b74b13b71f3a73 fix Issue 17168 https://github.com/dlang/dmd/commit/7b48c5b05b735182376e6bbd3382afef6072cec8 Merge pull request #6529 from UplinkCoder/fix_elshl fix Issue 17168 - refactor elshl
Comment #3 by github-bugzilla — 2017-02-16T18:14:14Z
Comment #4 by github-bugzilla — 2017-02-24T20:34:37Z