Commit ab5b8382 by Richard Guenther Committed by Richard Biener

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
parent fab75691
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.
2007-08-21 Ian Lance Taylor <iant@google.com>
PR tree-optimization/33134
......
2007-08-22 Richard Guenther <rguenther@suse.de>
PR middle-end/32563
* g++.dg/torture/pr32563.C: New testcase.
2007-08-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/32912
/* { dg-do compile } */
struct A
{
char c[1];
} a;
const __SIZE_TYPE__ i = (__SIZE_TYPE__)&a.c[0] - 1;
......@@ -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)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment