[Issue 2617] incorrect code generation for asm{ inc eax }
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 25 22:25:26 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2617
------- Comment #1 from 2korden at gmail.com 2009-01-26 00:25 -------
(In reply to comment #0)
> The following code fails to assert.
>
> import tango.core.Atomic;
> void main(){
> int j;
> foreach (i; 1..500_000){
> atomicIncrement!(msync.raw, int)(j);
> assert(j == (i%256));
> }
> }
>
Shouldn't that be:
assert(j == i); // ?
I have noted that Tango atomicIncrement increments least significant byte only,
too, and was wondering whether it is intended...
--
More information about the Digitalmars-d-bugs
mailing list