diff --git a/compiler/cgen.nim b/compiler/cgen.nim index d838f9b9c3..693930fbc4 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -746,7 +746,7 @@ proc genProcAux(m: BModule, prc: PSym) = else: fillResult(resNode) assignParam(p, res) - resetLoc(p, res.loc) + if sfNoInit notin prc.flags: resetLoc(p, res.loc) if skipTypes(res.typ, abstractInst).kind == tyArray: #incl(res.loc.flags, lfIndirect) res.loc.storage = OnUnknown