[Bug target/20286] [3.3 only] gcc panic with __thread attribute

wilson at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 24 00:10:00 GMT 2005


------- Additional Comments From wilson at gcc dot gnu dot org  2005-03-24 00:09 -------
That patch that fixed this in gcc-3.4 is too large to backport, particularly
when considering that it depends on other stuff (such as
default_encode_section_info) which is not already present in gcc-3.3.  However,
it can be fixed with a simpler patch.

The underlying problem is that a variable changes state from
TLS_MODEL_INTIAL_EXEC (extern) to TLS_MODEL_LOCAL_EXEC (static).  This is an
allowable transition.  This unfortunately triggers an abort in the ia64.c
backend in ia64_encode_section_info.  The comment next to the abort makes it
clear that this is checking for transitions  between thread data and small data.
 So the fix is to tighten the conditions under which we call the abort to match
the conditions documented in the comments.

The same INITIAL_EXEC to LOCAL_EXEC transition happens in gcc-3.4, there just
isn't a corresponding abort in default_encode_section_info.

Technically, this isn't a regression, as gcc-3.2 did not have TLS support, and
gcc-3.3 is only open for regression fixes, so there is the question of whether
this patch is OK to install on the branch.  A strict interpretation of the rules
says this is not OK, at least not without approval of the branch maintainer, Gaby.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |wilson at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-03-02 16:48:16         |2005-03-24 00:09:55
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20286



More information about the Gcc-bugs mailing list