Files
Nim/tests/threads/t8535.nim
LemonBoy ac0f5c83ca Fixes 8535 (#8591)
* Goodbye postInitProc

* Give preInitProc its own scope

Avoid any conflict between the variables introduced by preInitProc and
initProc since both are codegen'd in the same function body.

* Fix codegen for global var init in emulated TLS

Fixes #8535

* Add test for #8535

* Keep a bogus stack frame around

* Remove more dead code
2018-08-17 00:34:27 +02:00

17 lines
266 B
Nim

discard """
output: "0"
"""
type
CircAlloc* [Size: static[int] , T] = tuple
baseArray : array[Size,T]
index : uint16
type
Job = object of RootObj
var foo {.threadvar.}: CircAlloc[1,Job]
when isMainModule:
echo foo.index