From 5864d0fd05794f0610824e989d76dad832693642 Mon Sep 17 00:00:00 2001 From: ktkachov Date: Fri, 7 Oct 2016 14:47:55 +0000 Subject: [PATCH] [simplify-rtx] Zero-initialise local array in simplify_immed_subreg * simplify-rtx.c (simplify_immed_subreg): Zero-initialize tmp array before merging in bytes to pass down to real_from_target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240866 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/simplify-rtx.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad50ab9dcf7..fe68253b37a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-07 Kyrylo Tkachov + + * simplify-rtx.c (simplify_immed_subreg): Zero-initialize tmp array + before merging in bytes to pass down to real_from_target. + 2016-10-07 Richard Biener * tree-ssa-propagate.c (replace_phi_args_in): Remove no longer diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 67902792cdf..3cce25a0bf4 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -5893,14 +5893,12 @@ simplify_immed_subreg (machine_mode outermode, rtx op, case MODE_DECIMAL_FLOAT: { REAL_VALUE_TYPE r; - long tmp[MAX_BITSIZE_MODE_ANY_MODE / 32]; + long tmp[MAX_BITSIZE_MODE_ANY_MODE / 32] = { 0 }; /* real_from_target wants its input in words affected by FLOAT_WORDS_BIG_ENDIAN. However, we ignore this, and use WORDS_BIG_ENDIAN instead; see the documentation of SUBREG in rtl.texi. */ - for (i = 0; i < max_bitsize / 32; i++) - tmp[i] = 0; for (i = 0; i < elem_bitsize; i += value_bit) { int ibase; -- 2.11.4.GIT