aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-param-manipulation.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2020-12-07 16:00:00 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-12-07 16:26:40 +0100
commit92e563d91b012f09da8fd152e934f6b964ae49cb (patch)
tree360af309514b7537a6d1799fba9280c2cc9f20d4 /gcc/ipa-param-manipulation.c
parent724390745213d5192af04a51bb08cf44da7c396d (diff)
downloadgcc-92e563d91b012f09da8fd152e934f6b964ae49cb.zip
gcc-92e563d91b012f09da8fd152e934f6b964ae49cb.tar.gz
gcc-92e563d91b012f09da8fd152e934f6b964ae49cb.tar.bz2
Fix location info in ipa_param_body_adjustments::modify_call_stmt
Copy the location info from the passed in call stmt to the newly built gimple call stmt. 2020-12-07 Bernd Edlinger <bernd.edlinger@hotmail.de> * ipa-param-manipulation.c (ipa_param_body_adjustments::modify_call_stmt): Set location info.
Diffstat (limited to 'gcc/ipa-param-manipulation.c')
-rw-r--r--gcc/ipa-param-manipulation.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ipa-param-manipulation.c b/gcc/ipa-param-manipulation.c
index 2bbea21..9ab4a10 100644
--- a/gcc/ipa-param-manipulation.c
+++ b/gcc/ipa-param-manipulation.c
@@ -1681,6 +1681,8 @@ ipa_param_body_adjustments::modify_call_stmt (gcall **stmt_p)
}
}
gcall *new_stmt = gimple_build_call_vec (gimple_call_fn (stmt), vargs);
+ if (gimple_has_location (stmt))
+ gimple_set_location (new_stmt, gimple_location (stmt));
gimple_call_set_chain (new_stmt, gimple_call_chain (stmt));
gimple_call_copy_flags (new_stmt, stmt);
if (tree lhs = gimple_call_lhs (stmt))