summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-07 17:06:20 +0100
committerAraq <rumpf_a@web.de>2014-02-07 17:06:20 +0100
commita087f6057e70e8b7c57ec9a20ac7f7815afe9327 (patch)
treecb04da2bca11d066af59c012d189aff68e81aa2f /compiler
parent3be07d842a13cde69aeb5e7908ed62907daef4f7 (diff)
downloadNim-a087f6057e70e8b7c57ec9a20ac7f7815afe9327.tar.gz
bugfix: codegen issue that caused getGMTime() to leak memory
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index be47ac0c4..031ab8d70 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1049,7 +1049,7 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
     app(tmp2.r, field.loc.r)
     tmp2.k = locTemp
     tmp2.t = field.loc.t
-    tmp2.s = OnHeap
+    tmp2.s = if isRef: OnHeap else: OnStack
     tmp2.heapRoot = tmp.r
     expr(p, it.sons[1], tmp2)
   if d.k == locNone: