This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
store_constructor vs WORD_REGISTER_OPERATIONS
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dj at redhat dot com
- Date: Tue, 20 Nov 2001 22:44:30 -0500
- Subject: store_constructor vs WORD_REGISTER_OPERATIONS
There's a #ifdef WORD_REGISTER_OPERATIONS that conputes a new "value"
but "value" is never used! I think this is an obvious fix (only
lightly tested) but I've been surprised before.
2001-11-20 DJ Delorie <dj@redhat.com>
* expr.c (store_constructor): Actually use the value computed
if WORD_REGISTER_OPERATIONS.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.383
diff -p -3 -r1.383 expr.c
*** expr.c 2001/11/19 20:38:03 1.383
--- expr.c 2001/11/21 03:41:35
*************** store_constructor (exp, target, cleared,
*** 4546,4554 ****
for (elt = CONSTRUCTOR_ELTS (exp); elt; elt = TREE_CHAIN (elt))
{
tree field = TREE_PURPOSE (elt);
- #ifdef WORD_REGISTER_OPERATIONS
tree value = TREE_VALUE (elt);
- #endif
enum machine_mode mode;
HOST_WIDE_INT bitsize;
HOST_WIDE_INT bitpos = 0;
--- 4546,4552 ----
*************** store_constructor (exp, target, cleared,
*** 4562,4568 ****
if (field == 0)
continue;
! if (cleared && is_zeros_p (TREE_VALUE (elt)))
continue;
if (host_integerp (DECL_SIZE (field), 1))
--- 4560,4566 ----
if (field == 0)
continue;
! if (cleared && is_zeros_p (value))
continue;
if (host_integerp (DECL_SIZE (field), 1))
*************** store_constructor (exp, target, cleared,
*** 4655,4661 ****
}
store_constructor_field (to_rtx, bitsize, bitpos, mode,
! TREE_VALUE (elt), type, cleared,
get_alias_set (TREE_TYPE (field)));
}
}
--- 4653,4659 ----
}
store_constructor_field (to_rtx, bitsize, bitpos, mode,
! value, type, cleared,
get_alias_set (TREE_TYPE (field)));
}
}