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