On Thu, Oct 29, 2026 at 12:21 PM Jason Merrill <[email protected]> wrote:
> It seems that the bug can still happen if there are multiple
> declarations of the variable, where at least one is after the #pragma:
[...]
> Perhaps merge_weak also needs adjustment?

Yes, thanks.  It isn't specific to the pragma, either:

  __attribute__((visibility("hidden"), weak)) extern __thread int t6;
  __attribute__((visibility("hidden"))) extern __thread int t6;

gets local-exec too, so my commit message was wrong to say the
attribute is not affected. I'll send a v4 that handles redeclarations.

Matt

Reply via email to