This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to ignore zero-bit stores


The later code gets confused, so it's best to just short-circuit it.
Tested on Alphaev6.  Also committed to branch.

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.

*** expr.c	2001/05/02 02:04:27	1.312
--- expr.c	2001/05/02 16:57:27
*************** store_field (target, bitsize, bitpos, mo
*** 5132,5135 ****
--- 5132,5140 ----
      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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]