diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-05-02 17:08:19 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-05-02 13:08:19 -0400 |
commit | 2be6a7e9029968f7d19f4761f2b4ec013e32cd64 (patch) | |
tree | 1f34a5a35f2cb7fecc65e066a5131d93dfafd005 | |
parent | 3e411c3ffd2dae9901cb75fd36678865ab4fa91a (diff) | |
download | gcc-2be6a7e9029968f7d19f4761f2b4ec013e32cd64.zip gcc-2be6a7e9029968f7d19f4761f2b4ec013e32cd64.tar.gz gcc-2be6a7e9029968f7d19f4761f2b4ec013e32cd64.tar.bz2 |
expr.c (store_field): Do nothing except elaborate side-effects if zero-bit field.
* expr.c (store_field): Do nothing except elaborate side-effects if
zero-bit field.
From-SVN: r41763
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expr.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7dad94b..8779914 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed May 2 13:09:36 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * expr.c (store_field): Do nothing except elaborate side-effects if + zero-bit field. + 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * c-lex.c: NULL_PTR -> NULL. @@ -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; |