diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-06-02 14:50:08 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-06-02 14:50:08 +0200 |
commit | 8f215dcec4fcb98282552e156ecfa4b54f01f6db (patch) | |
tree | 3855d7ea3081fbc868ff162effb41193a7d8e24d /gcc/c-common.c | |
parent | bec7ddd796b113feda02b8d3b731611acc7bb341 (diff) | |
download | gcc-8f215dcec4fcb98282552e156ecfa4b54f01f6db.zip gcc-8f215dcec4fcb98282552e156ecfa4b54f01f6db.tar.gz gcc-8f215dcec4fcb98282552e156ecfa4b54f01f6db.tar.bz2 |
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
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |