[Issue 2151] New: Optimizer generates buggy array appending code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 16 07:11:22 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2151
Summary: Optimizer generates buggy array appending code
Product: D
Version: 2.014
Platform: PC
OS/Version: Windows
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: aniketdhamal at yahoo.co.in
ReportedBy: kolos80 at bk.ru
I have a loop like this:
i = 0;
...
while (i < s.length && s[i] != '"')
{
...
tmp ~= s[i];
++i;
}
Usually it works great. When I use the -O flag, it sometimes crashes, but if I
write it like this:
char c;
...
tmp ~= c = s[i];
... then it works great again. I don't see any reason for this strange
behavior, except of optimizer's tricks.
--
More information about the Digitalmars-d-bugs
mailing list