> Both are same. Ah, I see, the call is optimized out because __emutls_get_address is const. You can try
__thread int a; int main () { return *(int *)__emutls_get_address ((void *)0) == a; } I don't have an emutls target at hand, but it does fail on Linux. Paolo