From bc712c28fce6e8a849af305f1f84ab193c7cf090 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 8 Jul 2020 18:59:34 +0200 Subject: [PATCH] fixes #14865 (#14937) --- compiler/ccgthreadvars.nim | 1 + compiler/ccgtypes.nim | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler/ccgthreadvars.nim b/compiler/ccgthreadvars.nim index 8bf5e573f9..eba46f8299 100644 --- a/compiler/ccgthreadvars.nim +++ b/compiler/ccgthreadvars.nim @@ -42,6 +42,7 @@ proc declareThreadVar(m: BModule, s: PSym, isExtern: bool) = proc generateThreadLocalStorage(m: BModule) = if m.g.nimtv != nil and (usesThreadVars in m.flags or sfMainModule in m.module.flags): for t in items(m.g.nimtvDeps): discard getTypeDesc(m, t) + finishTypeDescriptions(m) m.s[cfsSeqTypes].addf("typedef struct {$1} NimThreadVars;$n", [m.g.nimtv]) proc generateThreadVarsSize(m: BModule) = diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index fb205110e6..f1dc858185 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -944,6 +944,7 @@ proc finishTypeDescriptions(m: BModule) = else: discard getTypeDescAux(m, t, check) inc(i) + m.typeStack.setLen 0 template cgDeclFrmt*(s: PSym): string = s.constraint.strVal