This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR debug/19124
- From: Richard Henderson <rth at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Dec 2004 20:00:54 -0800
- Subject: Re: [PATCH]: Fix PR debug/19124
- References: <Pine.LNX.4.60.0412272120520.6170@dberlin.org>
On Mon, Dec 27, 2004 at 09:27:08PM -0500, Daniel Berlin wrote:
> 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).
What a suck-ass rule. Because,
> +/* Return the first previous insn of INSN that is a non-note and non-label
> + (except for note_var_location's). */
> +
> +static rtx
> +prev_regular_or_varloc_insn (rtx insn)
> +{
> + while (insn)
> + {
> + insn = PREV_INSN (insn);
> + if (!insn
> + || (NOTE_P (insn)
> + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_VAR_LOCATION))
> + break;
> + if (NOTE_P (insn) || LABEL_P (insn))
> + continue;
> + break;
> + }
> + return insn;
> +}
All this tells you is that there's an insn. It doesn't say that the
insn expands to a non-zero number of assembly instructions. E.g.
asm ("" : "=r" (x) :"0"(x));
which has legitimate uses. There are also insns that the backend
expands to zero instructions that exist to keep the optimizer happy.
But I guess there's not a whole lot you can do about this.
r~