aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dcb4cac..c0e6bff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-02 Jakub Jelinek <jakub@redhat.com>
+
+ * c-common.c (c_get_alias_set): Check whether signed_type did not
+ return its argument before calling get_alias_set on the result.
+
2000-06-02 Andrew MacLeod <amacleod@cygnus.com>
* expr.c (emit_group_load): Fix typo, GET_MODE not GET_CODE.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 0ba6873..979c380 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -3298,8 +3298,13 @@ c_get_alias_set (t)
unsigned variants of the same type. We treat the signed
variant as canonical. */
if (TREE_CODE (t) == INTEGER_TYPE && TREE_UNSIGNED (t))
- return get_alias_set (signed_type (t));
+ {
+ tree t1 = signed_type (t);
+ /* t1 == t can happen for boolean nodes which are always unsigned. */
+ if (t1 != t)
+ return get_alias_set (t1);
+ }
else if (POINTER_TYPE_P (t))
{
tree t1;