[Issue 9844] New: DMD (-m64) int->long conversion bug
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 30 20:01:25 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9844
Summary: DMD (-m64) int->long conversion bug
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: blocker
Priority: P5
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: safety0ff.bugz at gmail.com
--- Comment #0 from safety0ff.bugz at gmail.com 2013-03-30 20:01:23 PDT ---
This program:
import std.stdio;
void main() {
int a = -1;
long b = a;
long c = -1;
writeln("a = ",a);
writeln("b = ",b);
writeln("c = ",c);
assert(a==b&&b==c&&a==c);
}
Gives the following erroneous output:
a = -1
b = -1
c = 4294967295
core.exception.AssertError at buggy(9): Assertion failure
Using 64bit output from DMD 2.062 (also DMD git 6202b02f0e from DPaste.)
The following compilers/options give the expected output:
DMD 2.062 -m32
LDC 2.060 (64 bit on DPaste)
GDC 2.060 (64 bit on DPaste)
--
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