diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-12-14 18:27:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-12-14 18:27:58 +0000 |
commit | 4e25ca6b3001f31fe48671c3d8c5f17cb7984288 (patch) | |
tree | 4878ec19a12cf3d4d25af300d804f7e8bafcdb19 /gcc/cfgexpand.c | |
parent | 3c0c50279beaa7857d301a864ff89e8a07bf09ed (diff) | |
download | gcc-4e25ca6b3001f31fe48671c3d8c5f17cb7984288.zip gcc-4e25ca6b3001f31fe48671c3d8c5f17cb7984288.tar.gz gcc-4e25ca6b3001f31fe48671c3d8c5f17cb7984288.tar.bz2 |
cfgexpand.c (expand_debug_expr): Remove overzealous assertion and useless code.
* cfgexpand.c (expand_debug_expr) <INDIRECT_REF>: Remove overzealous
assertion and useless code.
<TARGET_MEM_REF>: Likewise.
From-SVN: r155229
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4245d0f..08b211e 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2186,7 +2186,6 @@ expand_debug_expr (tree exp) int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp)); addr_space_t as; enum machine_mode address_mode; - enum machine_mode pointer_mode; switch (TREE_CODE_CLASS (TREE_CODE (exp))) { @@ -2382,17 +2381,15 @@ expand_debug_expr (tree exp) return NULL; if (POINTER_TYPE_P (TREE_TYPE (exp))) - as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp))); + { + as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp))); + address_mode = targetm.addr_space.address_mode (as); + } else - as = ADDR_SPACE_GENERIC; - - address_mode = targetm.addr_space.address_mode (as); - pointer_mode = targetm.addr_space.pointer_mode (as); - - gcc_assert (GET_MODE (op0) == address_mode - || GET_MODE (op0) == pointer_mode - || GET_CODE (op0) == CONST_INT - || GET_CODE (op0) == CONST_DOUBLE); + { + as = ADDR_SPACE_GENERIC; + address_mode = Pmode; + } if (TREE_CODE (exp) == ALIGN_INDIRECT_REF) { @@ -2412,19 +2409,11 @@ expand_debug_expr (tree exp) return NULL; op0 = expand_debug_expr - (tree_mem_ref_addr (build_pointer_type (TREE_TYPE (exp)), - exp)); + (tree_mem_ref_addr (build_pointer_type (TREE_TYPE (exp)), exp)); if (!op0) return NULL; as = TYPE_ADDR_SPACE (TREE_TYPE (exp)); - address_mode = targetm.addr_space.address_mode (as); - pointer_mode = targetm.addr_space.pointer_mode (as); - - gcc_assert (GET_MODE (op0) == address_mode - || GET_MODE (op0) == pointer_mode - || GET_CODE (op0) == CONST_INT - || GET_CODE (op0) == CONST_DOUBLE); op0 = gen_rtx_MEM (mode, op0); |