[Issue 8340] New: *= operator breaks long array in x64
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 3 10:47:11 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340
Summary: *= operator breaks long array in x64
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: iselix1988+dbugzilla at gmail.com
--- Comment #0 from iselix1988+dbugzilla at gmail.com 2012-07-03 10:47:09 PDT ---
When using *= operator with -1 of constant value for long array element , it
breaks next element value .
See code below:
---
void main(){
int[] ia = [1,2,3,4,5];
long[] la = [1,2,3,4,5];
ia[2] *= -1;
la[2] *= -1;
assert(ia == [1,2,-3,4,5]); // OK in x86 and x64
assert(la == [1,2,-3,4,5]); // OK in x86 but Failed in x64
// la == [1,2,-3,-5,5] in x64
}
---
--
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