summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-22 08:32:45 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-22 08:32:45 +0000
commit5a7c611911fc9748381b0128d63a1d9d27e18d0b (patch)
tree7aa8f428b2f4d9d7d4b5fd78e3e93f7e1346989e /gcc/tree-ssa-propagate.c
parent70d635f6d4177265e1222591f266ea38833388fa (diff)
downloadgcc-5a7c611911fc9748381b0128d63a1d9d27e18d0b.tar.gz
* tree-ssa-propagate.c (set_rhs): Copy EXPR_LOCATION if
needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c7
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: