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 c/11920] New: with -Os -fPIC, compiler forgets to emit labels/sections under certain conditions?


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: with -Os -fPIC, compiler forgets to emit labels/sections
                    under certain conditions?
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsaw at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu

The problem appears with a file contained in Xaw3d: xc/lib/SimpleMenu.c
(ftp://ftp.sunet.se/pub/X11/contrib/widgets/Xaw3d/R6.3/Xaw3d-1.5.tar.gz)

After trying to link the resulting library with a program, I get an error,
saying that "L98 is undefined".

Steps to check/reproduce:

gcc -Os -fPIC -S -c -o SimpleMenu.s SimpleMenu.c
-> offending code is: leal    .L98@GOTOFF(%ebx), %eax
   but L98 is found nowhere

If I add -fforce-addr, the "leal" is still there, but L98 exists:
gcc -Os -fPIC -fforce-addr -S -c -o SimpleMenu.s SimpleMenu.c


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