Unreachable code in reload.c
Kazu Hirata
kazu@cs.umass.edu
Mon Dec 6 21:59:00 GMT 2004
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
More information about the Gcc
mailing list