The gcc on OpenBSD 4.5 to 4.7 at least produces bad code for __thread,
without as much as a warning.
See PR #6410 "Using __thread TLS variables compiles ok but segfault at runtime."
http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6410
#ifdef __MINGW32__
#error MinGW has broken __thread support
#endif
+#ifdef __OpenBSD__
+#error OpenBSD has broken __thread support
+#endif
static __thread int x ;
int main () { x = 123; return x; }
], support_for__thread=yes)