+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>
PR debug/41473
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)))
{
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)
{
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);