diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-02 17:08:19 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-02 17:08:19 +0000 |
commit | 55e9836d3146ed53b23ee4a3445a93306e62bf7f (patch) | |
tree | 1f34a5a35f2cb7fecc65e066a5131d93dfafd005 /gcc/expr.c | |
parent | 4d6983458b4771354fed815a99f1bc461dddd76a (diff) | |
download | gcc-55e9836d3146ed53b23ee4a3445a93306e62bf7f.tar.gz |
* expr.c (store_field): Do nothing except elaborate side-effects if
zero-bit field.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 0ef52f5d9ce..67cafeb7c9c 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5131,6 +5131,11 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, if (TREE_CODE (exp) == ERROR_MARK) return const0_rtx; + /* If we have nothing to store, do nothing unless the expression has + side-effects. */ + if (bitsize == 0) + return expand_expr (exp, const0_rtx, VOIDmode, 0); + if (bitsize < HOST_BITS_PER_WIDE_INT) width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1; |