This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]