diff options
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index d539398c5c7..d28e1b620ff 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -1,5 +1,5 @@ /* Reassociation for trees. - Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Daniel Berlin <dan@dberlin.org> This file is part of GCC. @@ -1279,7 +1279,8 @@ remove_visited_stmt_chain (tree var) if (TREE_CODE (var) != SSA_NAME || !has_zero_uses (var)) return; stmt = SSA_NAME_DEF_STMT (var); - if (!gimple_visited_p (stmt)) + if (!is_gimple_assign (stmt) + || !gimple_visited_p (stmt)) return; var = gimple_assign_rhs1 (stmt); gsi = gsi_for_stmt (stmt); |