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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 
16:29:48 UTC ---
default_binds_local_p_1 has:
  /* Uninitialized COMMON variable may be unified with symbols
     resolved from other modules.  */
  else if (DECL_COMMON (exp)
           && !resolved_locally
           && (DECL_INITIAL (exp) == NULL
               || DECL_INITIAL (exp) == error_mark_node))
    local_p = false;

Now, it depends on what the callers expect.  If they want to figure out if the
decl can't be interposed by other library etc., then the above lines are
unnecessary, but if it wants to find out e.g. if it can trust DECL_INITIAL or
lack thereof of the DECL etc., then the above is needed.  E.g. we use
targetm.binds_local_p to find out if anchoring should be used, for commons it
certainly shouldn't be.

Reply via email to