This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/18603] New: local label names can collide with function names


GCC uses local label names .L1, .L2, etc. on this platform.
However these same assembly labels are used for functions named "L1" or "L2".

wolfgang@gorecki wolfgang $ cat L.c
int L2(int x)
{
        if(x > 5)
                return -42;
        else
                return 42;
}
wolfgang@gorecki wolfgang $ gcc -c L.c
/tmp/ccL2lhwX.s: Assembler messages:
/tmp/ccL2lhwX.s:26: Error: symbol `.L2' is already defined

Observed on gentoo powerpc64; also observed on a gcc-3.4.2 cross-compiling from powerpc-apple-
darwin to powerpc64-unknown-linux.

-- 
           Summary: local label names can collide with function names
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wolfgang dot thaller at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc64-unknown-linux
  GCC host triplet: powerpc64-unknown-linux
GCC target triplet: powerpc64-unknown-linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]