[Bug lto/45956] New: [4.6 Regression] Promoted statics conflict

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 9 16:44:00 GMT 2010


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

           Summary: [4.6 Regression] Promoted statics conflict
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


t1.c
----
int foo (void)
{
  static int i;
  return ++i;
}

t2.c
----
int bar (void)
{
  static int i;
  return ++i;
}

will have same (local) mangling for i (i.1214).  With -fwopr we bring
both units into one with the new partitioning where they now conflict.

Likely caused by my DECL_CONTEXT change which makes

2370      /* Register symbols with file or global scope to mark what input
2371         file has their definition.  */
2372      if (decl_function_context (decl) == NULL_TREE)
2373        {

not the correct test in lto_register_var_decl_in_symtab.



More information about the Gcc-bugs mailing list