aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-03-02 18:29:56 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-03-02 13:29:56 -0500
commit21318741bb4f00d87f558a2f11d462fa61381e80 (patch)
tree012b815e352352c505a47f997f46e1b9d2d6618a /gcc/fold-const.c
parent42f602d842e3fe935b626e082eff27d5621ea2b3 (diff)
downloadgcc-21318741bb4f00d87f558a2f11d462fa61381e80.zip
gcc-21318741bb4f00d87f558a2f11d462fa61381e80.tar.gz
gcc-21318741bb4f00d87f558a2f11d462fa61381e80.tar.bz2
c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink reference the language-equivalent of sizetype.
* c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink reference the language-equivalent of sizetype. * c-typeck.c (comptypes): Treat sizetype like its language equivalent. * fold-const.c (size_binop, size_diffop): Put back checks. * gcse.c (dump_hash_table): Fix minor error in last change. * stor-layout.c (set_sizetype): Set TYPE_DOMAIN of sizetype. Clear TYPE_{NEXT,MAIN}_VARIANT and TYPE_{POINTER,REFERENCE}_to of all sizetypes. * cp/typeck.c (comptypes): Treat sizetype like its language equivalent. From-SVN: r32291
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 097650f..7a4a485 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1868,8 +1868,8 @@ size_binop (code, arg0, arg1)
{
tree type = TREE_TYPE (arg0);
- if (TREE_CODE (type) != INTEGER_TYPE
- || TREE_CODE (TREE_TYPE (arg1)) != INTEGER_TYPE)
+ if (TREE_CODE (type) != INTEGER_TYPE || ! TYPE_IS_SIZETYPE (type)
+ || type != TREE_TYPE (arg1))
abort ();
/* Handle the special case of two integer constants faster. */
@@ -1905,8 +1905,8 @@ size_diffop (arg0, arg1)
tree type = TREE_TYPE (arg0);
tree ctype;
- if (TREE_CODE (type) != INTEGER_TYPE
- || TREE_CODE (TREE_TYPE (arg1)) != INTEGER_TYPE)
+ if (TREE_CODE (type) != INTEGER_TYPE || ! TYPE_IS_SIZETYPE (type)
+ || type != TREE_TYPE (arg1))
abort ();
/* If the type is already signed, just do the simple thing. */