[Issue 3421] Inline assembler problems accessing static variables

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3421

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|2.035   |D2

--


[Issue 3421] Inline assembler problems accessing static variables

2010-01-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3421


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #3 from Don clugd...@yahoo.com.au 2010-01-31 12:17:37 PST ---
Marking this as invalid, since it is an intentional change between D1 and D2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3421] Inline assembler problems accessing static variables

2009-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3421



--- Comment #2 from Graham grahamc00...@yahoo.co.uk 2009-10-20 15:29:29 PDT 
---
Thanks.

Is there any way to put __gshared or immutable into a typedef or alias so that
conditional compilation can allow code to compile with both DMD v1 and DMD v2 ?

I thought something like this would do it:

import std.stdio;

static __gshared uint value1 = 3;
static immutable uint value2 = 4;

version(D_Version2) {
mixin(typedef static __gshared uint __gshared_uint;);
mixin(typedef static immutable uint immutable_uint;);
}
else {
typedef static uint __gshared_uint;
typedef static uint immutable_uint;
}

__gshared_uint value3 = 5;
immutable_uint value4 = 6;

void main() {
uint save1, save2, save3, save4;
asm {
movEAX,value1;
movsave1,EAX;
movEAX,value2;
movsave2,EAX;
movEAX,value3;
movsave3,EAX;
movEAX,value4;
movsave4,EAX;
}
writefln(save1 %d save2 %d save3 %d save4 %d, save1, save2, save3,
save4);
}

but it does not:
dmd -vtls test03
test03.d(15): value3 is thread local
test03.d(16): value4 is thread local

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3421] Inline assembler problems accessing static variables

2009-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3421


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don clugd...@yahoo.com.au 2009-10-19 08:37:32 PDT ---
It's a change. statics are now thread-local by default. You need to mark as
__gshared if you want the D1 behaviour.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---