aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-01-15 09:08:17 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-01-15 09:08:17 +0100
commit2738b4c7e3ef411f52dd6664781c4cd8f5b901d4 (patch)
tree69e26de48aa826c4f842f48e9dc110c1f19025e0 /gcc/builtins.c
parent241f845ab3717714234437e28bbaf2b1cc5f4426 (diff)
downloadgcc-2738b4c7e3ef411f52dd6664781c4cd8f5b901d4.zip
gcc-2738b4c7e3ef411f52dd6664781c4cd8f5b901d4.tar.gz
gcc-2738b4c7e3ef411f52dd6664781c4cd8f5b901d4.tar.bz2
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
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index c983768..dc7c85e 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));