diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-09-03 09:03:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 09:03:26 +0200 |
commit | 0887dcc398a38c91e99a043acbb095afc7200460 (patch) | |
tree | 7e93abcfe1e85ec7a96a3e51a056597826943ce5 /compiler | |
parent | 64165f03fc96d6e8293f1b065a2e1e45f9fc1bf8 (diff) | |
download | Nim-0887dcc398a38c91e99a043acbb095afc7200460.tar.gz |
fixes #18786 (#18788)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sempass2.nim | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index b584bb232..cae2f926c 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -296,12 +296,11 @@ proc useVarNoInitCheck(a: PEffects; n: PNode; s: PSym) = if {sfGlobal, sfThread} * s.flags != {} and s.kind in {skVar, skLet} and s.magic != mNimvm: if s.guard != nil: guardGlobal(a, n, s.guard) - if strictEffects notin a.c.features: - if {sfGlobal, sfThread} * s.flags == {sfGlobal} and - (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): - #if a.config.hasWarn(warnGcUnsafe): warnAboutGcUnsafe(n) - markGcUnsafe(a, s) - markSideEffect(a, s, n.info) + if {sfGlobal, sfThread} * s.flags == {sfGlobal} and + (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): + #if a.config.hasWarn(warnGcUnsafe): warnAboutGcUnsafe(n) + markGcUnsafe(a, s) + markSideEffect(a, s, n.info) if s.owner != a.owner and s.kind in {skVar, skLet, skForVar, skResult, skParam} and {sfGlobal, sfThread} * s.flags == {}: a.isInnerProc = true |