This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in recent submission
- To: Andreas Schwab <schwab at issan dot cs dot uni-dortmund dot de>
- Subject: Re: Bug in recent submission
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Thu, 27 May 1999 03:30:03 -0600
- Cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
Thanks. I've installed this patch.
In message <vyzbtfgqgtg.fsf@issan.cs.uni-dortmund.de>you write:
> Ok, I think I do now understand what's going on here. The patch below
> will fix the ICE, and does not create any regressions, as far as i can
> see.
>
[ ... ]
>
> Andreas.
>
>
> 1999-05-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
>
> * fold-const.c (fold_truthop): Make the field reference unsigned
> when converting a single bit compare.
>
> --- egcs-2.93/gcc/fold-const.c.~1~ Wed May 19 19:54:59 1999
> +++ egcs-2.93/gcc/fold-const.c Wed May 19 19:06:49 1999
> @@ -3806,11 +3806,10 @@
> {
> if (l_const && integer_zerop (l_const) && integer_pow2p (ll_mask))
> {
> - /* Do not sign extend the constant here. The left operand
> - is either always unsigned or there is a BIT_AND_EXPR that
> - masks out the extension bits. */
> - if (! (ll_unsignedp || ll_and_mask != 0))
> - abort ();
> + /* Make the left operand unsigned, since we are only interested
> + in the value of one bit. Otherwise we are doing the wrong
> + thing below. */
> + ll_unsignedp = 1;
> l_const = ll_mask;
> }
> else
> @@ -3822,8 +3821,7 @@
> {
> if (r_const && integer_zerop (r_const) && integer_pow2p (rl_mask))
> {
> - if (! (rl_unsignedp || rl_and_mask != 0))
> - abort ();
> + rl_unsignedp = 1;
> r_const = rl_mask;
> }
> else