This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unreachable code in reload.c
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: e9925248 at stud4 dot tuwien dot ac dot at
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 06 Dec 2004 16:59:32 -0500 (EST)
- Subject: Re: Unreachable code in reload.c
- References: <20041206213801.GA29867@zuhause>
Hi Matrin,
> reload.c, function decompose, line 2355 (CVS HEAD version):
>
> val.start = true_regnum (x);
> if (val.start < 0)
> {
> /* A pseudo with no hard reg. */
> val.start = REGNO (x);
> val.end = val.start + 1;
> }
> else
> /* A hard reg. */
> val.end = val.start + hard_regno_nregs[val.start][GET_MODE (x)];
>
>
> The then-part of the if statement can never be reached
Neither is a part of the SUBREG case pointed to with an arrow.
case SUBREG:
if (!REG_P (SUBREG_REG (x)))
/* This could be more precise, but it's good enough. */
return decompose (SUBREG_REG (x));
val.reg_flag = 1;
val.start = true_regnum (x);
if (val.start < 0)
return decompose (SUBREG_REG (x)); <---
else
/* A hard reg. */
val.end = val.start + hard_regno_nregs[val.start][GET_MODE (x)];
break;
because true_regnum returns a non-negative number for a SUBREG with
REG in it. Perhaps you can convert these "if"s to gcc_assert like so?
gcc_assert (val.start >= 0);
Kazu Hirata