This commit is contained in:
Andreas Rumpf 2016-05-11 21:20:53 +02:00
commit ac1a753aff

View file

@ -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)