re PR other/58712 (issues found by --enable-checking=valgrind)
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Jan 2014 08:08:17 +0000 (09:08 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 15 Jan 2014 08:08:17 +0000 (09:08 +0100)
PR other/58712
* builtins.c (determine_block_size): Initialize *probable_max_size
even if len_rtx is CONST_INT.

From-SVN: r206621

gcc/ChangeLog
gcc/builtins.c

index bdee83f64209cbee7d70d98ff8aba6ff8b9c37dd..5729efd3ebe80f8bd7cd0f106bc0388756b00e6d 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/58712
+       * builtins.c (determine_block_size): Initialize *probable_max_size
+       even if len_rtx is CONST_INT.
+
 2014-01-14  Andrew Pinski  <apinski@cavium.com>
 
        * config/aarch64/aarch64-protos.h (tune_params): Add issue_rate.
index c983768f2f07ab6c11e3413abeddfa870069da93..dc7c85ed184a4f0a018a73009e2b7fb669fc3222 100644 (file)
@@ -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));