summary refs log tree commit diff stats
path: root/compiler/vmgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-01-19 20:24:44 +0100
committerAraq <rumpf_a@web.de>2014-01-19 20:24:44 +0100
commit15859d94ecce40d08520c8b2eaefc015682546c3 (patch)
tree1078c0a6429e15a9864d54121546a9995e749a6c /compiler/vmgen.nim
parent73c6efdf66dd62370cb04f7ce75640743905edc5 (diff)
downloadNim-15859d94ecce40d08520c8b2eaefc015682546c3.tar.gz
compiler warns when you use GC'ed memory and '--gc:none'
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r--compiler/vmgen.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index aea05bb2c..a41e60e7d 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -953,7 +953,7 @@ proc genAsgn(c: PCtx; le, ri: PNode; requiresCopy: bool) =
         c.gABx(le, whichAsgnOpc(le, opcWrGlobal), tmp, s.position)
     else:
       internalAssert s.position > 0 or (s.position == 0 and
-                                        s.kind in {skParam, skResult})
+                                        s.kind in {skParam,skResult,skForVar})
       var dest: TRegister = s.position + ord(s.kind == skParam)
       gen(c, ri, dest)
   else:
@@ -1014,7 +1014,8 @@ proc genRdVar(c: PCtx; n: PNode; dest: var TDest) =
     else:
       c.gABx(n, opcLdGlobal, dest, s.position)
   else:
-    if s.position > 0 or (s.position == 0 and s.kind in {skParam, skResult}):
+    if s.position > 0 or (s.position == 0 and
+                          s.kind in {skParam,skResult,skForVar}):
       if dest < 0:
         dest = s.position + ord(s.kind == skParam)
       else: