diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2003-10-10 19:21:12 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-10-10 15:21:12 -0400 |
commit | 7a06d606a6a5d81acae07c94490217c55278476b (patch) | |
tree | 7722b6ab3f8762ae29f0ecc9ce017162d94cdd55 /gcc/expr.c | |
parent | 892c9f1f53581abe563e6e0183fbc05936d10e95 (diff) | |
download | gcc-7a06d606a6a5d81acae07c94490217c55278476b.zip gcc-7a06d606a6a5d81acae07c94490217c55278476b.tar.gz gcc-7a06d606a6a5d81acae07c94490217c55278476b.tar.bz2 |
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
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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 |