aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-23 11:00:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-23 11:00:27 +0000
commitdca267461a4ec936658e9dccdb952a2ca4b9f3e4 (patch)
treee44e86d90275e1bd95ec240c0b97e8b9f05d5f35 /gcc/gimplify.c
parent030ef1fba5d03893d6cd2ae86395aadb76d788b7 (diff)
downloadgcc-dca267461a4ec936658e9dccdb952a2ca4b9f3e4.zip
gcc-dca267461a4ec936658e9dccdb952a2ca4b9f3e4.tar.gz
gcc-dca267461a4ec936658e9dccdb952a2ca4b9f3e4.tar.bz2
re PR tree-optimization/45750 (ICE: in iterative_hash_expr, at tree.c:6831 on invalid code)
2010-09-23 Richard Guenther <rguenther@suse.de> PR middle-end/45750 * gimplify.c (gimplify_expr): Properly pass on GS_ERROR when gimplifying MEM_REF. * gcc.dg/pr45750.c: New testcase. From-SVN: r164555
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 4e6a037..994ffde 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6809,8 +6809,10 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_reg, fb_rvalue);
- recalculate_side_effects (*expr_p);
+ if (ret == GS_ERROR)
+ break;
+ recalculate_side_effects (*expr_p);
*expr_p = fold_build2_loc (input_location, MEM_REF,
TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0),
@@ -6835,6 +6837,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_mem_ref_addr, fb_rvalue);
+ if (ret == GS_ERROR)
+ break;
recalculate_side_effects (*expr_p);
ret = GS_ALL_DONE;
break;