diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2019-10-16 16:44:34 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2019-10-16 16:44:34 +0000 |
commit | b7bfd3c503b063ad9bbcb975816423e82cf48636 (patch) | |
tree | 749d20ee8d28ea1546abbbca149e882a8fd7eba1 /gcc | |
parent | c32ffa8d1e16894d0338bbe79140bbae8e82a83c (diff) | |
download | gcc-b7bfd3c503b063ad9bbcb975816423e82cf48636.zip gcc-b7bfd3c503b063ad9bbcb975816423e82cf48636.tar.gz gcc-b7bfd3c503b063ad9bbcb975816423e82cf48636.tar.bz2 |
[arm] fix bootstrap failure due to uninitialized warning
The Arm port is failing bootstrap because GCC is now warning about an
unitialized array.
The code is complex enough that I certainly can't be sure the compiler
is wrong, so perhaps the best fix here is just to memset the entire
array before use.
* config/arm/arm.c (neon_valid_immediate): Clear bytes before use.
From-SVN: r277073
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11d3f13..5662f9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-16 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.c (neon_valid_immediate): Clear bytes before use. + 2019-10-16 Mihailo Stojanovic <mistojanovic@wavecomp.com> * config/mips/mips.c (mips_expand_builtin_insn): Force the diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ba33047..3bf8cd6 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12233,7 +12233,7 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse, unsigned int i, elsize = 0, idx = 0, n_elts; unsigned int innersize; - unsigned char bytes[16]; + unsigned char bytes[16] = {}; int immtype = -1, matches; unsigned int invmask = inverse ? 0xff : 0; bool vector = GET_CODE (op) == CONST_VECTOR; |