While looking at PR43058, I've noticed that we generate tons of completely useless location list elements. E.g. on the pr43058.c testcase with X2 instead of X4 X4 and without the PR43058 patch applied, we generate extremely long location list for the first a variable and then each loclist is 2 entries shorter. Most of the ranges in the list don't overlap with any DW_AT_ranges in the containing DW_TAG_lexical_block though.
-- Summary: .debug_loc is unnecessarily large Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43442