mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/42716 (ICE in extract_range_from_assert, at tree-vrp.c:1423)
2010-01-13 Richard Guenther <rguenther@suse.de> PR middle-end/42716 * fold-const.c (fold_unary_loc): Fold INDIRECT_REFs. * gcc.c-torture/compile/pr42716.c: New testcase. From-SVN: r155859
This commit is contained in:
parent
9e73c69087
commit
48f30f629f
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR middle-end/42716
|
||||||
|
* fold-const.c (fold_unary_loc): Fold INDIRECT_REFs.
|
||||||
|
|
||||||
2010-01-13 Jakub Jelinek <jakub@redhat.com>
|
2010-01-13 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR debug/41371
|
PR debug/41371
|
||||||
|
|
|
@ -8942,6 +8942,19 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
|
||||||
}
|
}
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
|
|
||||||
|
case INDIRECT_REF:
|
||||||
|
/* Fold *&X to X if X is an lvalue. */
|
||||||
|
if (TREE_CODE (op0) == ADDR_EXPR)
|
||||||
|
{
|
||||||
|
tree op00 = TREE_OPERAND (op0, 0);
|
||||||
|
if ((TREE_CODE (op00) == VAR_DECL
|
||||||
|
|| TREE_CODE (op00) == PARM_DECL
|
||||||
|
|| TREE_CODE (op00) == RESULT_DECL)
|
||||||
|
&& !TREE_READONLY (op00))
|
||||||
|
return op00;
|
||||||
|
}
|
||||||
|
return NULL_TREE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
} /* switch (code) */
|
} /* switch (code) */
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR middle-end/42716
|
||||||
|
* gcc.c-torture/compile/pr42716.c: New testcase.
|
||||||
|
|
||||||
2010-01-13 Richard Guenther <rguenther@suse.de>
|
2010-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR lto/42678
|
PR lto/42678
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
static short foo (long long si1, short si2)
|
||||||
|
{
|
||||||
|
return si1 > 0 && si2 > 0 || si1 < 0
|
||||||
|
&& si2 < 0 && si1 < 1 - si2 ? : si1 + si2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int g_13;
|
||||||
|
unsigned g_17;
|
||||||
|
|
||||||
|
int safe (int, int);
|
||||||
|
|
||||||
|
void bar (short p_51, short * p_52)
|
||||||
|
{
|
||||||
|
int *const l_55 = &g_13;
|
||||||
|
if (safe (*p_52, g_13 != foo (*p_52 & *l_55 == g_13 && g_17 >= 1, 0)))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue