[Issue 3115] New: Illegal optimization to unsigned right shift (only array)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 30 04:30:08 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3115
Summary: Illegal optimization to unsigned right shift (only
array)
Product: D
Version: 2.030
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P3
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: sys0tem at msn.com
Illegal optimization to unsigned right shift (only array)
// source code: test.d
import std.stdio;
int main(string[] args)
{
long a = -1;
long[] b = [ -1 ];
writefln("a (%X) >>> 1 = %X", a , (a >>> 1));
writefln("b[0](%X) >>> 1 = %X", b[0], (b[0] >>> 1));
return 0;
}
----
result (compile : dmd test.d)
a (FFFFFFFFFFFFFFFF) >>> 1 = 7FFFFFFFFFFFFFFF // OK
b[0](FFFFFFFFFFFFFFFF) >>> 1 = 7FFFFFFFFFFFFFFF // OK
----
result (compile : dmd -O test.d)
a (FFFFFFFFFFFFFFFF) >>> 1 = 7FFFFFFFFFFFFFFF // OK
b[0](FFFFFFFFFFFFFFFF) >>> 1 = FFFFFFFFFFFFFFFF // NG?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list