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
This commit is contained in:
parent
fab75691f3
commit
ab5b838291
4 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
8
gcc/testsuite/g++.dg/torture/pr32563.C
Normal file
8
gcc/testsuite/g++.dg/torture/pr32563.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* { 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)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue