D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17168 - Shift left operator causes segfault when compiling with -O flag
Summary: Shift left operator causes segfault when compiling with -O flag
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 18:06 UTC by Sophie
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Sophie 2017-02-09 18:06:42 UTC
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 Sophie 2017-02-09 18:09:49 UTC
Actually this occurs with the -O flag, independent of -inline
Comment 2 github-bugzilla 2017-02-11 23:12:09 UTC
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