(shorten_compare): When simplify compare against
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 17 Mar 1994 23:39:11 +0000 (15:39 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 17 Mar 1994 23:39:11 +0000 (15:39 -0800)
zero, check for restype_ptr unsigned instead of primop0 unsigned.

From-SVN: r6806

gcc/c-common.c

index ec60a5f..868a18b 100644 (file)
@@ -1651,7 +1651,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
       primop1 = op1;
 
       if (!real1 && !real2 && integer_zerop (primop1)
-         && TREE_UNSIGNED (TREE_TYPE (primop0)))
+         && TREE_UNSIGNED (*restype_ptr))
        {
          tree value = 0;
          switch (code)