mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-26 03:04:24 +08:00
gimplify.c (gimplify_expr): Do not crash when folding (void *)(int)&a + 4.
* gimplify.c (gimplify_expr): Do not crash when folding (void *)(int)&a + 4. From-SVN: r124497
This commit is contained in:
parent
5d148c0881
commit
2cb7995f07
@ -1,3 +1,8 @@
|
||||
2007-05-07 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* gimplify.c (gimplify_expr): Do not crash when folding
|
||||
(void *)(int)&a + 4.
|
||||
|
||||
2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
PR driver/31694
|
||||
|
@ -5887,6 +5887,8 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
|
||||
if (POINTER_TYPE_P (TREE_TYPE (*expr_p))
|
||||
&& TREE_CODE (TREE_OPERAND (*expr_p, 0)) == NOP_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (*expr_p, 1)) == INTEGER_CST
|
||||
&& POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (*expr_p,
|
||||
0),0)))
|
||||
&& (tmp = maybe_fold_offset_to_reference
|
||||
(TREE_OPERAND (TREE_OPERAND (*expr_p, 0), 0),
|
||||
TREE_OPERAND (*expr_p, 1),
|
||||
|
Loading…
Reference in New Issue
Block a user