Commit 4e25ca6b by Eric Botcazou Committed by Eric Botcazou

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
parent 3c0c5027
2009-12-14 Eric Botcazou <ebotcazou@adacore.com>
* cfgexpand.c (expand_debug_expr) <INDIRECT_REF>: Remove overzealous
assertion and useless code.
<TARGET_MEM_REF>: Likewise.
2009-12-14 Alexandre Oliva <aoliva@redhat.com> 2009-12-14 Alexandre Oliva <aoliva@redhat.com>
PR debug/41473 PR debug/41473
...@@ -2186,7 +2186,6 @@ expand_debug_expr (tree exp) ...@@ -2186,7 +2186,6 @@ expand_debug_expr (tree exp)
int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp)); int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp));
addr_space_t as; addr_space_t as;
enum machine_mode address_mode; enum machine_mode address_mode;
enum machine_mode pointer_mode;
switch (TREE_CODE_CLASS (TREE_CODE (exp))) switch (TREE_CODE_CLASS (TREE_CODE (exp)))
{ {
...@@ -2382,17 +2381,15 @@ expand_debug_expr (tree exp) ...@@ -2382,17 +2381,15 @@ expand_debug_expr (tree exp)
return NULL; return NULL;
if (POINTER_TYPE_P (TREE_TYPE (exp))) 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 else
as = ADDR_SPACE_GENERIC; {
as = ADDR_SPACE_GENERIC;
address_mode = targetm.addr_space.address_mode (as); address_mode = Pmode;
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);
if (TREE_CODE (exp) == ALIGN_INDIRECT_REF) if (TREE_CODE (exp) == ALIGN_INDIRECT_REF)
{ {
...@@ -2412,19 +2409,11 @@ expand_debug_expr (tree exp) ...@@ -2412,19 +2409,11 @@ expand_debug_expr (tree exp)
return NULL; return NULL;
op0 = expand_debug_expr op0 = expand_debug_expr
(tree_mem_ref_addr (build_pointer_type (TREE_TYPE (exp)), (tree_mem_ref_addr (build_pointer_type (TREE_TYPE (exp)), exp));
exp));
if (!op0) if (!op0)
return NULL; return NULL;
as = TYPE_ADDR_SPACE (TREE_TYPE (exp)); 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); op0 = gen_rtx_MEM (mode, op0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment