diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-22 08:00:55 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-22 08:00:55 +0000 |
commit | be1f1b71b57c9ef7368247173e2249857cb6397d (patch) | |
tree | 3960d6ecc6340ec35fb85c2bf8b034916ba3f0c3 /gcc/tree.c | |
parent | 948c3a111fff299999bfe89e0f23e9c4cad5dd90 (diff) | |
download | gcc-be1f1b71b57c9ef7368247173e2249857cb6397d.tar.gz |
2007-08-22 Richard Guenther <rguenther@suse.de>
PR middle-end/32563
* tree.c (host_integerp): Treat sizetype as signed as it is
sign-extended.
* g++.dg/torture/pr32563.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127688 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index ce4ee5d263f..95aa1b9e040 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4936,7 +4936,8 @@ host_integerp (const_tree t, int pos) && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) >= 0) || (! pos && TREE_INT_CST_HIGH (t) == -1 && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0 - && !TYPE_UNSIGNED (TREE_TYPE (t))) + && (!TYPE_UNSIGNED (TREE_TYPE (t)) + || TYPE_IS_SIZETYPE (TREE_TYPE (t)))) || (pos && TREE_INT_CST_HIGH (t) == 0))); } |