Do thread local variables work in -betterC? Or maybe it's better to ask are they supposed to work in -betterC?
Here's a simple test program:
// test.d
auto a;
extern(C) void main() {
printf("before... ");
a = 42;
printf("after");
}
import core.stdc.stdio;
And here is the output of compiling and running:
$ dmd -betterC test.d; ./test.exe
before... after
$ dmd -betterC -m64 test.d; ./test.exe
before... [program hangs for 3 seconds, and then exits without printing anything else]
So when I compile a 64-bit version, the program just hangs when writing to the thread local variable. But it does work when compiled for 32-bits. So what is the intended outcome here?