[Issue 1705] New: CodeView: static variables in functions not assigned to procedure scope
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 1 10:33:41 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1705
Summary: CodeView: static variables in functions not assigned to
procedure scope
Product: D
Version: 2.009
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: jascha at mainia.de
in the following example, static_var should be in the scope of main() (_TMP0
probably, too).
----------------------------------------------------------------------
import std.stdio;
void main()
{
static uint static_var = 3;
uint local_var = static_var;
writefln("%d", local_var);
}
----------------------------------------------------------------------
$$SYMBOLS segment
S_COMPILE 06 x008000 Z8.51.0
S_LDATA32 off = x0000, seg = x0000, typ = x0075 _D4main4mainFZv10static_vark
segidx = 5 offset = 0018, lcfd = ec10, fd = 1, td = 2, targdisp = x0000
S_LDATA32 off = x0008, seg = x0000, typ = x1001 _TMP0
segidx = 5 offset = 0041, lcfd = ec10, fd = 1, td = 2, targdisp = x0000
S_GPROC32 par=x00000000 end=x00000000 next=x00000000 len=x002a debsta=x0004
debend=x0028 off=x0000 seg=x0000 proctyp=x1002 near _Dmain
segidx = 5 offset = 006b, lcfd = ec12, fd = 1, td = 3, targdisp = x0000
S_ENDARG
S_BPREL32 off = xfffffffc, typ = x0075 local_var
S_RETURN 03 00 00
S_END
S_GDATA32 off = x0000, seg = x0000, typ = x1004 D14TypeInfo_B3Aak6__initZ
segidx = 5 offset = 00a2, lcfd = ec12, fd = 1, td = 4, targdisp = x0000
--
More information about the Digitalmars-d-bugs
mailing list