http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-07-30 20:29:05 UTC --- > In my program, only one destructor function exists. Yes in your source only has one but the code really there is two. One for the __thread implementation and one you have in your source. So I think we might declare this as being unspecified behavior. The same way the order of the destructor is unspecified.