diff options
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 7 |
1 files changed, 7 insertions, 0 deletions
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: |