Bug 60819 - Unresolved symbols with g++ -g -O2
Summary: Unresolved symbols with g++ -g -O2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-07 11:48 UTC by Stefan Sorensen
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-03-07 11:48:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Sorensen 2002-03-07 11:48:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.1.3 (X11; Linux i686; U;) Gecko/20020206

Description of problem:
When defining a global const variable, compiling it with g++ with optimization
and debugging turned on, unresolved symbold are generated.

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

How reproducible:
Always

Steps to Reproduce:
$ cat foo.cpp
const char foo[] = "bar";
$ g++ -g -O2 -c foo.cpp
$ nm foo.o
         U .LC0


Actual Results:  An unresolved symbol.

Expected Results: No unresolved symbols.

Additional info:

Leaving out debugging info, optimization or const qualifier produces expected
result.

Comment 1 Jakub Jelinek 2002-03-09 21:57:19 UTC
This should be fixed in 3.1-0.22.


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