Bug 523810 - DW_TAG_structure_type gets wrong decl coordinates for forward decl case
Summary: DW_TAG_structure_type gets wrong decl coordinates for forward decl case
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 526977
TreeView+ depends on / blocked
 
Reported: 2009-09-16 18:12 UTC by Roland McGrath
Modified: 2009-10-02 20:04 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-21 07:27:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test case source (72 bytes, text/plain)
2009-09-16 18:12 UTC, Roland McGrath
no flags Details
eu-readelf --debug-dump=info output (1.94 KB, application/octet-stream)
2009-09-16 18:13 UTC, Roland McGrath
no flags Details

Description Roland McGrath 2009-09-16 18:12:59 UTC
Created attachment 361345 [details]
test case source

Description of problem:



Version-Release number of selected component (if applicable):
gcc-4.4.1-2.fc11.x86_64

People tell me F-12/rawhide gcc behaves the same.

How reproducible:
100%

Steps to Reproduce:
1.gcc -g -o forw forw.c
2.eu-readelf --debug-dump=info forw
3.Look at decl_line of structure_type DIE.
  
Actual results:

Reports forw.c line 1.

Expected results:

Reports forw.c line 8.

Additional info:

The DIE generated is for the full definition of the struct, but the decl coordinates in that DIE are for the source location of the opaque forward decl rather than those of the defining decl the DIE really describes.

Note that when compiled as C++, the same source gets the right decl coordinates.

Comment 1 Roland McGrath 2009-09-16 18:13:48 UTC
Created attachment 361346 [details]
eu-readelf --debug-dump=info output

Comment 2 Jakub Jelinek 2009-09-17 14:13:58 UTC
Testing a 4.5 fix so far, the 4.4 backport will be slightly more involved, as 4.4-RH lacks Aldy's precise location tracking changes.

Comment 3 Roland McGrath 2009-09-17 19:13:13 UTC
Obviously this is not really an urgent issue.  But it does reduce the opportunities for DWARF compression (that's how I noticed it).

Comment 4 Jakub Jelinek 2009-09-21 07:27:41 UTC
In gcc-4.4.1-15.


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