diff options
author | Richard Guenther <rguenther@suse.de> | 2007-08-22 08:00:55 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-08-22 08:00:55 +0000 |
commit | ab5b838291744491de7731c928c3c717eb70418b (patch) | |
tree | 3960d6ecc6340ec35fb85c2bf8b034916ba3f0c3 /gcc/tree.c | |
parent | fab75691f337b3184596a3ca0de95dff5a4348cf (diff) | |
download | gcc-ab5b838291744491de7731c928c3c717eb70418b.zip gcc-ab5b838291744491de7731c928c3c717eb70418b.tar.gz gcc-ab5b838291744491de7731c928c3c717eb70418b.tar.bz2 |
re PR debug/32563 (ICE on pointer arithmetic)
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.
From-SVN: r127688
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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))); } |