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.
Created attachment 361346 [details] eu-readelf --debug-dump=info output
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.
Obviously this is not really an urgent issue. But it does reduce the opportunities for DWARF compression (that's how I noticed it).
In gcc-4.4.1-15.