Tests weak-1.c and weak-16.c from gcc.dg/weak fail on
powerpc64-unknown-linux-gnu with -m64.  A small test case from the last check
in weak-1.c is:

    #pragma weak weakvar
    extern int weakvar;
    int use_it () { return weakvar; }

That check has failed since r139233, when it started failing for both -m32 and
-m64.  The check started passing again for -m32 with r140539, but continues to
fail for -m64.

A referenced external weak symbol used to be added to the weak_decls list in a
call to declare_weak, but now is added to that list from assemble_external. 
For -m64 there is no call to assemble_external for this weak reference.  The
fix in r140539 has special handling for Darwin, so perhaps similar special
handling is needed for GNU/Linux, or perhaps the rs6000 backend needs to call
mark_symbol_refs_as_used as is done for sh, arm, and s390; I haven't figured
out where that would be.

Test weak-16.c was added in r140540 for the fix in r140539 for PR 37280.


-- 
           Summary: referenced external symbol not marked weak for ppc64
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc64-unknown-linux-gnu


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

Reply via email to