Fix location info in ipa_param_body_adjustments::modify_call_stmt
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 7 Dec 2020 15:00:00 +0000 (16:00 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 7 Dec 2020 15:26:40 +0000 (16:26 +0100)
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.

gcc/ipa-param-manipulation.c

index 2bbea21be2ebee04da5c7e95a218dbbabe1f5519..9ab4a10096d061032d6db8e612a31129e2033aea 100644 (file)
@@ -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))