fixes #576
This commit is contained in:
parent
51672aef72
commit
f1e789bfc2
3 changed files with 6 additions and 3 deletions
|
|
@ -151,8 +151,9 @@ proc genSingleVar(p: BProc, a: PNode) =
|
|||
var targetProc = p
|
||||
var immediateAsgn = a.sons[2].kind != nkEmpty
|
||||
if sfGlobal in v.flags:
|
||||
if v.owner.kind != skModule:
|
||||
targetProc = p.module.postInitProc
|
||||
if sfPure in v.flags:
|
||||
# v.owner.kind != skModule:
|
||||
targetProc = p.module.preInitProc
|
||||
assignGlobalVar(targetProc, v)
|
||||
# XXX: be careful here.
|
||||
# Global variables should not be zeromem-ed within loops
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue