Andrew Klaassen:
This happens with dmd, ldc2 and gdc, so I assume it's something I'm doing wrong rather than a bug. What's the explanation? What am I doing wrong?
Do you know that module level variables in D are thread-local? If you don't what that, you have to use __gshared. Bye, bearophile