https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78294
--- Comment #25 from Dmitry Vyukov <dvyukov at google dot com> --- > The question is if we want to change this or not and in what way. I would say that we need to change something, because current behavior is counter-intuitive. In tsan runtime we have a declaration with the attribute and definition without the attribute. For most of other things (e.g. static) attributes/qualifiers are propagated from declaration to definition. I would do the obvious propagation automatically, and then maybe warn about all other cases (e.g. conflicting tls models, or addition of initial-exec after the variable was already used).