OSDN Git Service

(convert_to_pointer): Fix typo comparing size of integer and pointers.
authorsac <sac@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Mar 1993 22:18:45 +0000 (22:18 +0000)
committersac <sac@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Mar 1993 22:18:45 +0000 (22:18 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3651 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/convert.c

index f4e6efa..95bac9c 100644 (file)
@@ -56,7 +56,9 @@ convert_to_pointer (type, expr)
       if (type_precision (intype) == POINTER_SIZE)
        return build1 (CONVERT_EXPR, type, expr);
       expr = convert (type_for_size (POINTER_SIZE, 0), expr);
-      if (TYPE_MODE (TREE_TYPE (expr)) != TYPE_MODE (type))
+      /* Modes may be different but sizes should be the same.  */
+      if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (expr)))
+         != GET_MODE_SIZE (TYPE_MODE (type)))
        /* There is supposed to be some integral type
           that is the same width as a pointer.  */
        abort ();