aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2014-10-08 12:33:43 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2014-10-08 13:33:43 +0100
commitc168f180720f857ef66ae9d23a27859afd1baa9a (patch)
treef6b9cb0610560e43a7ba356c1ef1e6733c7672eb
parent98c31526f2a4677f6cbee1fb518199328356ad55 (diff)
downloadgcc-c168f180720f857ef66ae9d23a27859afd1baa9a.zip
gcc-c168f180720f857ef66ae9d23a27859afd1baa9a.tar.gz
gcc-c168f180720f857ef66ae9d23a27859afd1baa9a.tar.bz2
cfgexpand.c (expand_debug_expr): Get address space from operand 0 (BASE).
* cfgexpand.c (expand_debug_expr) <TARGET_MEM_REF>: Get address space from operand 0 (BASE). Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r216000
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cfgexpand.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e198b2b..f577bf0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-08 Joern Rennecke <joern.rennecke@embecosm.com>
+ Richard Biener <rguenther@suse.de>
+
+ * cfgexpand.c (expand_debug_expr) <TARGET_MEM_REF>:
+ Get address space from operand 0 (BASE).
+
2014-10-07 Iain Sandoe <iain@codesourcery.com>
PR target/61387
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index f95981b..5cb96df 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3983,11 +3983,7 @@ expand_debug_expr (tree exp)
if (!op0)
return NULL;
- if (POINTER_TYPE_P (TREE_TYPE (exp)))
- as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp)));
- else
- as = ADDR_SPACE_GENERIC;
-
+ as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))));
op0 = convert_debug_memory_address (targetm.addr_space.address_mode (as),
op0, as);
if (op0 == NULL_RTX)