diff mbox series

[committed] One c-family TREE_INT_CST_LOW -> tree_to_uhwi change

Message ID 20171121135905.GY14653@tucnak
State New
Headers show
Series [committed] One c-family TREE_INT_CST_LOW -> tree_to_uhwi change | expand

Commit Message

Jakub Jelinek Nov. 21, 2017, 1:59 p.m. UTC
Hi!

When tweaking c-common.c last time, I was looking for TREE_INT_CST_LOW
uses and which are justified and which aren't.  This case caught my eyes,
while it isn't wrong, pretty much everywhere in the compiler we after
tree_fits_uhwi_p use tree_to_uhwi.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed as obvious.

2017-11-21  Jakub Jelinek  <jakub@redhat.com>

	* c-common.c (get_nonnull_operand): Use tree_to_uhwi.


	Jakub
diff mbox series

Patch

--- gcc/c-family/c-common.c.jj	2017-11-21 09:05:08.000000000 +0100
+++ gcc/c-family/c-common.c	2017-11-21 12:17:19.300064345 +0100
@@ -5359,7 +5359,7 @@  get_nonnull_operand (tree arg_num_expr,
   /* 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