From: Jakub Jelinek Date: Wed, 15 Jan 2014 08:08:17 +0000 (+0100) Subject: re PR other/58712 (issues found by --enable-checking=valgrind) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2738b4c7e3ef411f52dd6664781c4cd8f5b901d4;p=gcc.git re PR other/58712 (issues found by --enable-checking=valgrind) PR other/58712 * builtins.c (determine_block_size): Initialize *probable_max_size even if len_rtx is CONST_INT. From-SVN: r206621 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdee83f6420..5729efd3ebe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-01-15 Jakub Jelinek + + PR other/58712 + * builtins.c (determine_block_size): Initialize *probable_max_size + even if len_rtx is CONST_INT. + 2014-01-14 Andrew Pinski * config/aarch64/aarch64-protos.h (tune_params): Add issue_rate. diff --git a/gcc/builtins.c b/gcc/builtins.c index c983768f2f0..dc7c85ed184 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3117,7 +3117,7 @@ determine_block_size (tree len, rtx len_rtx, { if (CONST_INT_P (len_rtx)) { - *min_size = *max_size = UINTVAL (len_rtx); + *min_size = *max_size = *probable_max_size = UINTVAL (len_rtx); return; } else @@ -3131,7 +3131,8 @@ determine_block_size (tree len, rtx len_rtx, else *min_size = 0; if (tree_fits_uhwi_p (TYPE_MAX_VALUE (TREE_TYPE (len)))) - *probable_max_size = *max_size = tree_to_uhwi (TYPE_MAX_VALUE (TREE_TYPE (len))); + *probable_max_size = *max_size + = tree_to_uhwi (TYPE_MAX_VALUE (TREE_TYPE (len))); else *probable_max_size = *max_size = GET_MODE_MASK (GET_MODE (len_rtx));