Bug 11920 - with -Os -fPIC, compiler forgets to emit labels/sections under certain conditions?
Summary: with -Os -fPIC, compiler forgets to emit labels/sections under certain condit...
Status: RESOLVED DUPLICATE of bug 11350
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-14 13:01 UTC by Juergen "George" Sawinski
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i586-pc-linux-gnu
Target: i586-pc-linux-gnu
Build: i586-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen "George" Sawinski 2003-08-14 13:01:20 UTC
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
Comment 1 Andrew Pinski 2003-08-14 13:08:38 UTC
This is a pure dup of bug 11350 which is not fixed yet.

*** This bug has been marked as a duplicate of 11350 ***