diff options
author | Jan Hubicka <jh@suse.cz> | 2007-05-07 12:36:09 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-05-07 10:36:09 +0000 |
commit | 2cb7995f0758c4863805c4f8320d918373ef0bb8 (patch) | |
tree | 651b4edad9654b204a894c6c5fbaae6dba6e140f /gcc/gimplify.c | |
parent | 5d148c0881d967cf079ae15b03a3c2a8b8118355 (diff) | |
download | gcc-2cb7995f0758c4863805c4f8320d918373ef0bb8.zip gcc-2cb7995f0758c4863805c4f8320d918373ef0bb8.tar.gz gcc-2cb7995f0758c4863805c4f8320d918373ef0bb8.tar.bz2 |
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
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 3efb2b8..a6978d9 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -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), |