summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-09 14:16:13 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-08-09 14:16:26 +0200
commit440ed8eb68e3b602f6330d7aa54cff4447d0f0bf (patch)
tree6a17527822b6ec9daa87b41211cf818740833adf /compiler
parentf1092512e3c9c0c4b9c744fcef49db6b9c5a5623 (diff)
downloadNim-440ed8eb68e3b602f6330d7aa54cff4447d0f0bf.tar.gz
fixes #4551
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgexprs.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index f4068b2a2..7a60e1ef7 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1980,6 +1980,9 @@ proc exprComplexConst(p: BProc, n: PNode, d: var TLoc) =
     fillLoc(d, locData, t, tmp, OnStatic)
   else:
     putDataIntoDest(p, d, t, tmp)
+    # This fixes bug #4551, but we really need better dataflow
+    # analysis to make this 100% safe.
+    d.s = OnStatic
 
 proc expr(p: BProc, n: PNode, d: var TLoc) =
   case n.kind