aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-11-27 16:16:10 +0000
committerDehao Chen <dehao@google.com>2012-11-27 16:16:10 +0000
commita00ff7ee53e13342f2951965835ebe05b104c784 (patch)
treeff16f3506f76a7ebac9b514a57c43b1920c9bf01 /gcc/ipa-prop.c
parent2a45472631ee8d9842dec6f2442949148b967e8a (diff)
2010-11-27 Dehao Chen <dehao@google.com>
* ipa-prop.c (ipa_modify_call_arguments): Set loc correctly. * emit-rtl.c (last_location): Remove unused variable. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193857 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index b7da2544044..6016257369f 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2910,7 +2910,8 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple stmt,
gcc_checking_assert (adj->offset % BITS_PER_UNIT == 0);
base = gimple_call_arg (stmt, adj->base_index);
- loc = EXPR_LOCATION (base);
+ loc = DECL_P (base) ? DECL_SOURCE_LOCATION (base)
+ : EXPR_LOCATION (base);
if (TREE_CODE (base) != ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (base)))