From: Jeff Law Date: Tue, 4 Apr 2017 15:30:30 +0000 (-0600) Subject: mips.c (mips_multi_add): Zero initialize the newly added member. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8734bc723261fe8a0ba3b354f94519dfa60562ce;p=gcc.git mips.c (mips_multi_add): Zero initialize the newly added member. * config/mips/mips.c (mips_multi_add): Zero initialize the newly added member. (mips_expand_vec_perm_const): Initialize elements in orig_perm that are not set by the loop over the elements. From-SVN: r246681 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66d6cb719b3..c2075882484 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-04-04 Jeff Law + + * config/mips/mips.c (mips_multi_add): Zero initialize the newly + added member. + (mips_expand_vec_perm_const): Initialize elements in orig_perm + that are not set by the loop over the elements. + 2017-04-04 Jakub Jelinek PR target/80286 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 42943e01908..b35fba7e2ad 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4574,12 +4574,13 @@ mips_multi_start (void) mips_multi_num_insns = 0; } -/* Add a new, uninitialized member to the current multi-insn sequence. */ +/* Add a new, zero initialized member to the current multi-insn sequence. */ static struct mips_multi_member * mips_multi_add (void) { mips_multi_member empty; + memset (&empty, 0, sizeof (empty)); return mips_multi_members.safe_push (empty); } @@ -21355,6 +21356,9 @@ mips_expand_vec_perm_const (rtx operands[4]) d.nelt = nelt = GET_MODE_NUNITS (d.vmode); d.testing_p = false; + /* This is overly conservative, but ensures we don't get an + uninitialized warning on ORIG_PERM. */ + memset (&orig_perm[nelt], 0, MAX_VECT_LEN); for (i = which = 0; i < nelt; ++i) { rtx e = XVECEXP (sel, 0, i);