Bug 9171 – error optimization of expression

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2012-12-17T02:10:00Z
Last change time
2015-06-09T05:11:41Z
Assigned to
nobody
Creator
syavadee

Attachments

IDFilenameSummaryContent-TypeSize
1169bug.dsource file showing problemtext/x-dsrc947

Comments

Comment #0 by syavadee — 2012-12-17T02:10:14Z
Created attachment 1169 source file showing problem $ dmd -O bug.d && ./bug nobug: r=0111000000000000000100000000000000000000000000000000 z=0000000000000000000010000000000000000000000000000000 bug: r=0111000000000000000100000000000000000000000000000000 z=0000000000000000000000000000000000000000000000000000 # ^ this wrong $ dmd bug.d && ./bug nobug: r=0111000000000000000100000000000000000000000000000000 z=0000000000000000000010000000000000000000000000000000 bug: r=0111000000000000000100000000000000000000000000000000 z=0000000000000000000010000000000000000000000000000000 # ^ this ok dmd 2.060, ubuntu 12.04 and windows xp
Comment #1 by clugdbug — 2012-12-17T07:34:34Z
Works for me on git head. Could be a duplicate of bug 8840.
Comment #2 by github-bugzilla — 2012-12-17T18:14:19Z
Comment #3 by github-bugzilla — 2012-12-17T18:14:24Z
Comment #4 by bugzilla — 2012-12-17T18:15:00Z
This bug has been there for over 15 years.
Comment #5 by hsteoh — 2012-12-17T18:41:18Z
Scary. Confirms that old adage about non-trivial software being never actually bug-free.
Comment #6 by bugzilla — 2012-12-17T20:55:17Z
To be fair, triggering this requires a very rare confluence of seemingly random and unrelated things, which is why it hasn't been reported before. It's appearance now suggests an expanding user base for D. Anyhow, I like to put a high priority on fixing these kinds of issues because they can be very frustrating and demoralizing to users.
Comment #7 by hsteoh — 2012-12-17T21:01:34Z
Another frustrating one is the template cross-talk one, bug 8542. It discouraged me from writing too much functional-style code, for fear that I might run into it again.