aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-isolate-paths.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-ssa-isolate-paths.c')
-rw-r--r--gcc/gimple-ssa-isolate-paths.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c
index f9bb249..108b98e 100644
--- a/gcc/gimple-ssa-isolate-paths.c
+++ b/gcc/gimple-ssa-isolate-paths.c
@@ -74,9 +74,11 @@ insert_trap_and_remove_trailing_statements (gimple_stmt_iterator *si_p, tree op)
LHS will be a throw-away SSA_NAME and the RHS is the NULL dereference.
If the dereference is a store and we can easily transform the RHS,
- then simplify the RHS to enable more DCE. */
+ then simplify the RHS to enable more DCE. Note that we require the
+ statement to be a GIMPLE_ASSIGN which filters out calls on the RHS. */
gimple stmt = gsi_stmt (*si_p);
if (walk_stmt_load_store_ops (stmt, (void *)op, NULL, check_loadstore)
+ && is_gimple_assign (stmt)
&& INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (stmt))))
{
/* We just need to turn the RHS into zero converted to the proper