c-common.c (c_get_alias_set): Check whether signed_type did not return its argument before calling...

* c-common.c (c_get_alias_set): Check whether signed_type did not
	return its argument before calling get_alias_set on the result.

From-SVN: r34356
This commit is contained in:
Jakub Jelinek 2000-06-02 14:50:08 +02:00 committed by Jakub Jelinek
parent bec7ddd796
commit 8f215dcec4
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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;