diff mbox series

[COMMITTED] Fix location info in ipa_param_body_adjustments::modify_call_stmt

Message ID AM6PR03MB51703714E846969EFEEF40D5E4CE0@AM6PR03MB5170.eurprd03.prod.outlook.com
State New
Headers show
Series [COMMITTED] Fix location info in ipa_param_body_adjustments::modify_call_stmt | expand

Commit Message

Bernd Edlinger Dec. 7, 2020, 3:31 p.m. UTC
On 12/7/20 11:50 AM, Richard Biener wrote:
> 
> The ipa-param-manipulation.c hunk is OK, please commit separately.
> 

Okay, this is the part I just committed.

commit 92e563d91b012f09da8fd152e934f6b964ae49cb
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date:   Mon Dec 7 16:00:00 2020 +0100

    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.
diff mbox series

Patch

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))