cfgexpand.c (expand_debug_expr): Get address space from operand 0 (BASE).
authorJoern Rennecke <joern.rennecke@embecosm.com>
Wed, 8 Oct 2014 12:33:43 +0000 (12:33 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 8 Oct 2014 12:33:43 +0000 (13:33 +0100)
        * 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

gcc/ChangeLog
gcc/cfgexpand.c

index e198b2bf30cf8f954d29076c4ea21688027ea94e..f577bf0ae98c1c323ce030dc03fd31a2aebb04b3 100644 (file)
@@ -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
index f95981be6b6601dbdfc1b54d013b6b6ccb8beada..5cb96df037fb3b2ef8ecdb1385d416e986e3953a 100644 (file)
@@ -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)