Bug 60819 - Unresolved symbols with g++ -g -O2
Unresolved symbols with g++ -g -O2
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2002-03-07 06:48 EST by Stefan Sorensen
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:
Last Closed: 2002-03-07 06:48:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stefan Sorensen 2002-03-07 06:48:30 EST
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):

How reproducible:

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
Comment 1 Jakub Jelinek 2002-03-09 16:57:19 EST
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.