------- Comment #5 from dnovillo at gcc dot gnu dot org 2005-10-20 17:52 ------- The problem here is that when we are parsing the second declaration, we call start_decl before having parsed the threadprivate clause. This causes us to miss the attribute.
One solution I'm considering is to look-ahead in c_parser_declaration_or_fndef and build a regular tls_model attribute instead of lazily setting DECL_TLS_MODEL when we get to the threadprivate #pragma. That seems a more natural way of setting threadprivate attributes. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24455