aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@gnu.org>1993-03-04 22:18:45 +0000
committerSteve Chamberlain <sac@gnu.org>1993-03-04 22:18:45 +0000
commit502d58a60ef3f9a5e3a567ea0c1d9a635cfc0d13 (patch)
tree87e454e64465f8e06ad03670d594ed841533caa0 /gcc
parentab8ab9d05fd1ceaada3bfd6e345bd163319eb932 (diff)
downloadgcc-502d58a60ef3f9a5e3a567ea0c1d9a635cfc0d13.zip
gcc-502d58a60ef3f9a5e3a567ea0c1d9a635cfc0d13.tar.gz
gcc-502d58a60ef3f9a5e3a567ea0c1d9a635cfc0d13.tar.bz2
(convert_to_pointer): Fix typo comparing size of integer and pointers.
From-SVN: r3651
Diffstat (limited to 'gcc')
-rw-r--r--gcc/convert.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index f4e6efa..95bac9c 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -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 ();