(copy_rtx_if_shared): Don't try to copy a 0-length vector.

From-SVN: r4774
This commit is contained in:
Richard Stallman 1993-06-28 00:41:41 +00:00
parent ef5d30c934
commit f072210714
1 changed files with 5 additions and 5 deletions

View File

@ -1418,12 +1418,12 @@ copy_rtx_if_shared (orig)
if (XVEC (x, i) != NULL)
{
register int j;
int len = XVECLEN (x, i);
if (copied)
XVEC (x, i) = gen_rtvec_v (XVECLEN (x, i), &XVECEXP (x, i, 0));
for (j = 0; j < XVECLEN (x, i); j++)
XVECEXP (x, i, j)
= copy_rtx_if_shared (XVECEXP (x, i, j));
if (copied && len > 0)
XVEC (x, i) = gen_rtvec_v (len, &XVECEXP (x, i, 0));
for (j = 0; j < len; j++)
XVECEXP (x, i, j) = copy_rtx_if_shared (XVECEXP (x, i, j));
}
break;
}