digitalmars.D.bugs - [Issue 8340] New: *= operator breaks long array in x64
- d-bugmail puremagic.com (30/30) Jul 03 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
- d-bugmail puremagic.com (11/11) Nov 08 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
- d-bugmail puremagic.com (12/12) Nov 08 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
- d-bugmail puremagic.com (8/8) Nov 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
- d-bugmail puremagic.com (8/8) Nov 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
- d-bugmail puremagic.com (12/12) Nov 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8340
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 puremagic.com ReportedBy: iselix1988+dbugzilla gmail.com --- Comment #0 from iselix1988+dbugzilla 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: -------
Jul 03 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340 hsteoh quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh quickfur.ath.cx --- Comment #1 from hsteoh quickfur.ath.cx 2012-11-08 21:05:43 PST --- Tested on dmd git HEAD and gdc 4.7 (2.058); the bug only happens on dmd -m64. Not sure if this is a regression, or if it's a dmd backend bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 08 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340 --- Comment #2 from hsteoh quickfur.ath.cx 2012-11-08 21:21:22 PST --- Hmm, looks like a dmd backend bug: gdc (unoptimized) produces neg (respectively negl) instructions for negating the array element of ia (resp. la), but dmd -m64 produces negl (resp. negq) instead. This produces correct results for la, because dmd actually generates it as a quad array, whereas ia remains an int array. This is a violation of the D spec (which states that int==32 bits and long==64 bits; seems like the dmd backend is wrongly using int==32 bits and long==128 bits (inconsistently). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 08 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340 --- Comment #3 from github-bugzilla puremagic.com 2012-11-09 00:11:48 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/af7b7f098a6e91c34993f43d3afda54e54a96a4e fix Issue 8340 - *= operator breaks long array in x64 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340 --- Comment #4 from github-bugzilla puremagic.com 2012-11-09 00:13:45 PST --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/74eee15c8ed326f53bed4956e772064a4ee6e246 fix Issue 8340 - *= operator breaks long array in x64 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8340 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Version|D2 |D1 & D2 Resolution| |FIXED Severity|normal |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2012