[Bug middle-end/38237] New: [4.4 regression] multiple weak directives

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 23 14:04:00 GMT 2008


This is a fallout of

2008-08-19  Rafael Espíndola  <espindola@google.com>

        * varasm.c (weak_decls): Move earlier in the file.
        (assemble_external): Add weak decls to the weak_decls list.
        (declare_weak): Don't add decls to the weak_decls list.


eric@atlantis:~/build/gcc/native32> cat t.c
extern int i __attribute__((weak));

void foo(void)
{
  int a = i + i + i + i;
}
eric@atlantis:~/build/gcc/native32> cat t.s
        .file   "t.c"
        .text
.globl foo
        .type   foo, @function
foo:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $16, %esp
        movl    i, %edx
        movl    i, %eax
        addl    %eax, %edx
        movl    i, %eax
        addl    %eax, %edx
        movl    i, %eax
        leal    (%edx,%eax), %eax
        movl    %eax, -4(%ebp)
        leave
        ret
        .size   foo, .-foo
        .weak   i
        .weak   i
        .weak   i
        .weak   i
        .ident  "GCC: (GNU) 4.4.0 20081122 (experimental) [trunk revision
142117]"
        .section        .note.GNU-stack,"",@progbits


-- 
           Summary: [4.4 regression] multiple weak directives
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ebotcazou at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list