Support thread-local variables declared inside procs; fixes #7565

This commit is contained in:
Zahary Karadjov 2018-04-29 13:50:21 +03:00 • committed by Andreas Rumpf
commit ae5c946a32
4 changed files with 85 additions and 3 deletions

View file

@ -777,7 +777,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
incl(sym.flags, sfRegister)
of wThreadVar:
noVal(it)
incl(sym.flags, sfThread)
incl(sym.flags, {sfThread, sfGlobal})
of wDeadCodeElimUnused: discard # deprecated, dead code elim always on
of wNoForward: pragmaNoForward(c, it)
of wReorder: pragmaNoForward(c, it, sfReorder)