summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-27 16:16:10 +0000
committerdehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-27 16:16:10 +0000
commitc7abeac58d5bb179f032292b4c9bc05b0b4402fc (patch)
treeff16f3506f76a7ebac9b514a57c43b1920c9bf01
parent329fcd6e94d3d73838902cbd9f9a22b604f1bdfb (diff)
downloadgcc-c7abeac58d5bb179f032292b4c9bc05b0b4402fc.tar.gz
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193857 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/emit-rtl.c3
-rw-r--r--gcc/ipa-prop.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9cecb38abd3..7ae020a9dba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2012-11-27 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index a15be5194b3..08c4b60683b 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -5954,7 +5954,7 @@ location_t epilogue_location;
/* Hold current location information and last location information, so the
datastructures are built lazily only when some instructions in given
place are needed. */
-static location_t curr_location, last_location;
+static location_t curr_location;
/* Allocate insn location datastructure. */
void
@@ -5962,7 +5962,6 @@ insn_locations_init (void)
{
prologue_location = epilogue_location = 0;
curr_location = UNKNOWN_LOCATION;
- last_location = UNKNOWN_LOCATION;
}
/* At the end of emit stage, clear current location. */
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)))