* c-common.c (get_nonnull_operand): Use tree_to_uhwi.
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Nov 2017 13:57:11 +0000 (14:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Nov 2017 13:57:11 +0000 (14:57 +0100)
From-SVN: r255003

gcc/c-family/ChangeLog
gcc/c-family/c-common.c

index 7258f865fb9dc3592982c00dc726e5efed509116..308a617e6163b0fa6e155bbcf647c2114a330eaf 100644 (file)
@@ -1,5 +1,7 @@
 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
 
+       * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
+
        PR c++/83059
        * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
        instead of tree_to_uhwi, formatting fix.
index 969f41bdd8cabc406b432c36efba7af73f857311..9970e611c7c05d12fef69b4121d185328583b50f 100644 (file)
@@ -5359,7 +5359,7 @@ get_nonnull_operand (tree arg_num_expr, unsigned HOST_WIDE_INT *valp)
   /* Verify the arg number is a small constant.  */
   if (tree_fits_uhwi_p (arg_num_expr))
     {
-      *valp = TREE_INT_CST_LOW (arg_num_expr);
+      *valp = tree_to_uhwi (arg_num_expr);
       return true;
     }
   else