Bug 61697 - g++ 3.1 in skipjack: -g -O2: undefined reference to `.LC1'
Summary: g++ 3.1 in skipjack: -g -O2: undefined reference to `.LC1'
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fwhois   
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-03-23 04:25 UTC by Sam Varshavchik
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-23 15:23:05 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

Description Sam Varshavchik 2002-03-23 04:25:00 UTC
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:

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-23 04:26:23 UTC
Created attachment 49806 [details]
.tar.gz with the test program.

Comment 2 Jakub Jelinek 2002-03-23 11:47:00 UTC
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 15:23:00 UTC
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.