Bug 61697 - g++ 3.1 in skipjack: -g -O2: undefined reference to `.LC1'
g++ 3.1 in skipjack: -g -O2: undefined reference to `.LC1'
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: fwhois (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-22 23:25 EST by Sam Varshavchik
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-23 10:23:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
.tar.gz with the test program. (53.65 KB, application/octet-stream)
2002-03-22 23:26 EST, Sam Varshavchik
no flags Details

  None (edit)
Description Sam Varshavchik 2002-03-22 23:25:00 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311

Description of problem:
g++ 3.1 in skipjack aborts with an internal error when compiling the following
test program if both -g and -O2 options are used.  Using either -g or -O2 works;
the combination of two triggers an unresolved symbol in the link phase.

I have isolated a small snippet from a larger code base, containing two small .C
and one .h file, with an autoconf and automake wrapper.

Note that the default configuration for autoconf will use -g and -O2 for
compiling C and C++ code.



Version-Release number of selected component (if applicable): 3.1


How reproducible:
Always

Steps to Reproduce:
1. Unpack the .tar.gz from the following attachment.
2. Run ./configure
3. Run ./make
	

Actual Results:

g++  -Wall -g -O2   -o testafxpipe  testafxpipe.o libafx.a 
testafxpipe.o(.debug_info+0xeab6): undefined reference to `.LC1'
testafxpipe.o(.debug_info+0xeaf5): undefined reference to `.LC2'
libafx.a(afxpipe.o)(.debug_info+0x125d9): undefined reference to `.LC1'
libafx.a(afxpipe.o)(.debug_info+0x12698): undefined reference to `.LC2'
collect2: ld returned 1 exit status


Expected Results:

Rerun the configure script and provide the --with-testmode option.
Run 'make clean', then 'make'.  This will use only the '-g' option when
compiling the .C file.  Or you can manually edit Makefile and drop -g or -O2
from CFLAGS and CXXFLAGS, it doesn't matter.

The test program will now build succesfully.

Additional info:

See the following attachment with two .C and one .h file.
Comment 1 Sam Varshavchik 2002-03-22 23:26:23 EST
Created attachment 49806 [details]
.tar.gz with the test program.
Comment 2 Jakub Jelinek 2002-03-23 06:47:00 EST
What do you mean by g++ 3.1 in skipjack.
AFAIK there was none, maybe just in preview.
Certainly I cannot reproduce this with gcc3-c++-3.1-0.23.1 nor gcc-c++-2.96-107.
As you mention above command g++ and version 3.1, I wonder whether you
aren't using some older gcc-c++-3.1-0.[12]* compiler (this was something
which I remember fixing somewhere between 0.21 and 0.23 I think).
Comment 3 Sam Varshavchik 2002-03-23 10:23:00 EST
I loaded the wrong machine :-(.  This is actually gcc-3.1-0.21 from the first beta.

Note You need to log in before you can comment on or make changes to this bug.