fixes #3956
This commit is contained in:
parent
8dec1dcd1f
commit
ac1a753aff
1 changed files with 5 additions and 4 deletions
|
|
@ -1337,10 +1337,11 @@ proc genGlobalInit(c: PCtx; n: PNode; s: PSym) =
|
|||
# var decls{.compileTime.}: seq[NimNode] = @[]
|
||||
let dest = c.getTemp(s.typ)
|
||||
c.gABx(n, opcLdGlobal, dest, s.position)
|
||||
let tmp = c.genx(s.ast)
|
||||
c.preventFalseAlias(n, opcWrDeref, dest, 0, tmp)
|
||||
c.freeTemp(dest)
|
||||
c.freeTemp(tmp)
|
||||
if s.ast != nil:
|
||||
let tmp = c.genx(s.ast)
|
||||
c.preventFalseAlias(n, opcWrDeref, dest, 0, tmp)
|
||||
c.freeTemp(dest)
|
||||
c.freeTemp(tmp)
|
||||
|
||||
proc genRdVar(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags) =
|
||||
let s = n.sym
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue