[PR 83990] Fix location handling in ipa_modify_call_arguments

2018-02-13  Martin Jambor  <mjambor@suse.cz>

	PR c++/83990
	* ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
	of call statements, also set location of a load to a temporary.

From-SVN: r257623
This commit is contained in:
Martin Jambor 2018-02-13 13:25:36 +01:00 committed by Martin Jambor
parent e4c1b7e322
commit b607e47420
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2018-02-13 Martin Jambor <mjambor@suse.cz>
PR c++/83990
* ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
of call statements, also set location of a load to a temporary.
2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (add_vector_labels): New function.

View File

@ -295,8 +295,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gcall *stmt,
poly_int64 byte_offset = exact_div (adj->offset, BITS_PER_UNIT);
base = gimple_call_arg (stmt, adj->base_index);
loc = DECL_P (base) ? DECL_SOURCE_LOCATION (base)
: EXPR_LOCATION (base);
loc = gimple_location (stmt);
if (TREE_CODE (base) != ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (base)))
@ -385,6 +384,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gcall *stmt,
else
expr = create_tmp_reg (TREE_TYPE (expr));
gimple_assign_set_lhs (tem, expr);
gimple_set_location (tem, loc);
gsi_insert_before (&gsi, tem, GSI_SAME_STMT);
}
}