re PR c/52549 (ice in pointer_diff)
2012-04-13 Richard Guenther <rguenther@suse.de> PR c/52549 * c-typeck.c (pointer_diff): Remove bogus assert. * gcc.dg/pr52549.c: New testcase. From-SVN: r186408
This commit is contained in:
parent
09c2b6d028
commit
1e867b228f
@ -1,3 +1,8 @@
|
||||
2012-04-13 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/52549
|
||||
* c-typeck.c (pointer_diff): Remove bogus assert.
|
||||
|
||||
2012-04-13 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/52862
|
||||
|
@ -3446,8 +3446,6 @@ pointer_diff (location_t loc, tree op0, tree op1)
|
||||
else
|
||||
con1 = op1;
|
||||
|
||||
gcc_assert (TREE_CODE (con0) != PLUS_EXPR
|
||||
&& TREE_CODE (con1) != PLUS_EXPR);
|
||||
if (TREE_CODE (con0) == POINTER_PLUS_EXPR)
|
||||
{
|
||||
lit0 = TREE_OPERAND (con0, 1);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-04-13 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/52549
|
||||
* gcc.dg/pr52549.c: New testcase.
|
||||
|
||||
2012-04-13 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/52862
|
||||
|
6
gcc/testsuite/gcc.dg/pr52549.c
Normal file
6
gcc/testsuite/gcc.dg/pr52549.c
Normal file
@ -0,0 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
_mark (long obj, int i, char *a)
|
||||
{
|
||||
(char *)&(((long *)(obj)) [i]) - a;
|
||||
}
|
Loading…
Reference in New Issue
Block a user