diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-propagate.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f81896b2c30..11c8865ee18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-09-22 Jakub Jelinek <jakub@redhat.com> + + * tree-ssa-propagate.c (set_rhs): Copy EXPR_LOCATION if + needed. + 2006-09-21 Richard Sandiford <richard@codesourcery.com> * varasm.c (copy_constant): Fix reversed gcc_assert check. diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 111b39d3ab3..f9ece62a9a8 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -592,6 +592,13 @@ set_rhs (tree *stmt_p, tree expr) || code == MODIFY_EXPR) return false; + if (EXPR_HAS_LOCATION (stmt) + && EXPR_P (expr) + && ! EXPR_HAS_LOCATION (expr) + && TREE_SIDE_EFFECTS (expr) + && TREE_CODE (expr) != LABEL_EXPR) + SET_EXPR_LOCATION (expr, EXPR_LOCATION (stmt)); + switch (TREE_CODE (stmt)) { case RETURN_EXPR: |