https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107419

            Bug ID: 107419
           Summary: attributes are ignored when selecting TLS model
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amonakov at gcc dot gnu.org
                CC: amonakov at gcc dot gnu.org, asolokha at gmx dot com,
                    bergner at gcc dot gnu.org, iains at gcc dot gnu.org,
                    law at gcc dot gnu.org, marxin at gcc dot gnu.org,
                    segher at gcc dot gnu.org, seurer at gcc dot gnu.org,
                    unassigned at gcc dot gnu.org
            Blocks: 107353
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #107353 +++

__attribute__((common))
__thread int i;

int *f()
{
        return &i;
}

C frontend invokes decl_default_tls_model before processing attributes,
assigning local-exec model as if the 'common' attribute was not present.
Recomputing it later would select initial-exec model, breaking internal
verification that was weakened to solve PR 107353.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107353
[Bug 107353] [13 regression] Numerous ICEs after r13-3416-g1d561e1851c466

Reply via email to