summaryrefslogtreecommitdiff
path: root/gcc/var-tracking.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-17 19:51:03 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-17 19:51:03 +0000
commit4a55735d9080bd57956562512c53035f8e34a43f (patch)
tree400fd705981724f0d5f15249d7546ef4f7a96d8f /gcc/var-tracking.c
parent102a8e0c13c87ff079c5162d2fa9ed0d505b3100 (diff)
downloadgcc-4a55735d9080bd57956562512c53035f8e34a43f.tar.gz
Check SUBREG in prepare_call_arguments.
2011-03-17 H.J. Lu <hongjiu.lu@intel.com> PR debug/48160 * var-tracking.c (prepare_call_arguments): Check SUBREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r--gcc/var-tracking.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index aab98331df3..7c4c2c57b36 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -5770,7 +5770,11 @@ prepare_call_arguments (basic_block bb, rtx insn)
/* Try harder, when passing address of a constant
pool integer it can be easily read back. */
- val = CSELIB_VAL_PTR (XEXP (item, 1));
+ item = XEXP (item, 1);
+ if (GET_CODE (item) == SUBREG)
+ item = SUBREG_REG (item);
+ gcc_assert (GET_CODE (item) == VALUE);
+ val = CSELIB_VAL_PTR (item);
for (l = val->locs; l; l = l->next)
if (GET_CODE (l->loc) == SYMBOL_REF
&& TREE_CONSTANT_POOL_ADDRESS_P (l->loc)