MIPS: Prevent buffer overrun in uninitialised variable fix

gcc/
	* config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
	uninitialized variable warning to avoid buffer overrun.

From-SVN: r247022
This commit is contained in:
Matthew Fortune 2017-04-20 13:27:05 +00:00 committed by Matthew Fortune
parent 1b36f6036e
commit 798d7f42dc
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2017-04-20 Matthew Fortune <matthew.fortune@imgtec.com>
* config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
uninitialized variable warning to avoid buffer overrun.
2017-04-20 Alexander Monakov <amonakov@ispras.ru>
PR other/71250

View file

@ -21358,7 +21358,7 @@ mips_expand_vec_perm_const (rtx operands[4])
/* This is overly conservative, but ensures we don't get an
uninitialized warning on ORIG_PERM. */
memset (&orig_perm[nelt], 0, MAX_VECT_LEN);
memset (orig_perm, 0, MAX_VECT_LEN);
for (i = which = 0; i < nelt; ++i)
{
rtx e = XVECEXP (sel, 0, i);