stor-layout.c (compute_record_mode): Don't force BLKmode if field is zero-length BLKmode.
* stor-layout.c (compute_record_mode): Don't force BLKmode if field is zero-length BLKmode. * expr.c (expand_expr, case COMPONENT_REF): Handle case of BLKmode zero-size references. From-SVN: r72311
This commit is contained in:
parent
892c9f1f53
commit
7a06d606a6
|
@ -1,5 +1,10 @@
|
|||
2003-10-10 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* stor-layout.c (compute_record_mode): Don't force BLKmode if
|
||||
field is zero-length BLKmode.
|
||||
* expr.c (expand_expr, case COMPONENT_REF): Handle case of BLKmode
|
||||
zero-size references.
|
||||
|
||||
* combine.c (distribute_links): Properly test for REG being set.
|
||||
|
||||
* config/alpha/alpha.c (alpha_expand_block_mode): Don't use
|
||||
|
|
14
gcc/expr.c
14
gcc/expr.c
|
@ -7223,6 +7223,12 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
|||
|
||||
if (ext_mode == BLKmode)
|
||||
{
|
||||
if (target == 0)
|
||||
target = assign_temp (type, 0, 1, 1);
|
||||
|
||||
if (bitsize == 0)
|
||||
return target;
|
||||
|
||||
/* In this case, BITPOS must start at a byte boundary and
|
||||
TARGET, if specified, must be a MEM. */
|
||||
if (GET_CODE (op0) != MEM
|
||||
|
@ -7230,11 +7236,9 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
|||
|| bitpos % BITS_PER_UNIT != 0)
|
||||
abort ();
|
||||
|
||||
op0 = adjust_address (op0, VOIDmode, bitpos / BITS_PER_UNIT);
|
||||
if (target == 0)
|
||||
target = assign_temp (type, 0, 1, 1);
|
||||
|
||||
emit_block_move (target, op0,
|
||||
emit_block_move (target,
|
||||
adjust_address (op0, VOIDmode,
|
||||
bitpos / BITS_PER_UNIT),
|
||||
GEN_INT ((bitsize + BITS_PER_UNIT - 1)
|
||||
/ BITS_PER_UNIT),
|
||||
(modifier == EXPAND_STACK_PARM
|
||||
|
|
|
@ -1318,7 +1318,9 @@ compute_record_mode (tree type)
|
|||
|
||||
if (TREE_CODE (TREE_TYPE (field)) == ERROR_MARK
|
||||
|| (TYPE_MODE (TREE_TYPE (field)) == BLKmode
|
||||
&& ! TYPE_NO_FORCE_BLK (TREE_TYPE (field)))
|
||||
&& ! TYPE_NO_FORCE_BLK (TREE_TYPE (field))
|
||||
&& !(TYPE_SIZE (TREE_TYPE (field)) != 0
|
||||
&& integer_zerop (TYPE_SIZE (TREE_TYPE (field)))))
|
||||
|| ! host_integerp (bit_position (field), 1)
|
||||
|| DECL_SIZE (field) == 0
|
||||
|| ! host_integerp (DECL_SIZE (field), 1))
|
||||
|
|
Loading…
Reference in New Issue