Bug 464018 - typedef of unnamed struct debug info lost in C++
typedef of unnamed struct debug info lost in C++
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2008-09-25 17:33 EDT by Hiroto Shibuya
Modified: 2013-11-13 09:47 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-13 09:47:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
foo.cc which reproduces the problem (49 bytes, text/plain)
2008-09-25 17:33 EDT, Hiroto Shibuya
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 35463 None None None Never

  None (edit)
Description Hiroto Shibuya 2008-09-25 17:33:06 EDT
Created attachment 317733 [details]
foo.cc which reproduces the problem

Description of problem:

When C++ code includes typedefed unamed struct, typedefed type name
is not included in the object file.  It works fine if the struct
is named or compiled in C.  It was working fine with
g++ (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3).

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

g++ (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)

How reproducible:


Steps to Reproduce:
1. Compile the attached source:
   $ g++ -g -c foo.cc
2. Load the object into gdb
   $ gdb foo.o
3. Try to use the typedefed name "FooT"
   gdb> p sizeof(FooT)

Actual results:
No symbol "FooT" in current context.

Expected results:
$1 = 4

Additional info:

gdb> info types
All defined types:

File foo.cc:
typedef ._0;
typedef ::;
typedef int;
typedef int;

When compiled with gcc 3.4, it will show:
(gdb) info types
All defined types:

File foo.cc:
typedef ::;
typedef FooT;
typedef int;
Comment 1 Hiroto Shibuya 2008-09-26 17:02:27 EDT
This seems to be the corresponding GCC bug. 


As I noted there, I confirmed this to have regressed between 4.0.4 and 4.1.0.
Comment 2 Hiroto Shibuya 2009-04-30 09:19:49 EDT
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35463#c4 is updated

------- Comment #4 From Jakub Jelinek 2009-04-30 13:05 [reply] -------
I think this has been fixed by
on the trunk
Comment 3 Jeff Law 2013-11-13 09:47:01 EST
"This Bugzilla has been reviewed by Red Hat and is not planned on being
addressed in Red Hat Enterprise Linux 5, and therefore will be closed.
If this bug is critical to production systems, please contact your Red
Hat support representative and provide sufficient business
justification. Issue is already fixed in RHEL-6/7."

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