This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Fix PR debug/19124
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Dec 2004 21:27:08 -0500 (EST)
- Subject: [PATCH]: Fix PR debug/19124
This is actually a 3.4 bug as well, it just happens to be triggered by 4.0
easier (at least, i believe the location tracking code is in 3.4, if not,
then it's just a 4.0 regression :P)
The dwarf3 standard says we can't have location list entries where the
begin and end addresses are the same (except for the list terminator
entry, which is begin == 0 && end == 0).
The current code had two problems that would cause this to occur:
1. We just compared against the previous insn, not the previous insn that
is either a note-var-location (in which case we can reuse it's label), or
real code.
2. We never checked whether the entry had the same label for begin and
end, and if so, skip it.
The following patch fixes both issues.
Bootstrapped and regtested on i686-pc-linux-gnu.
Okay for mainline?
Attachment:
19124.diff
Description: Text document