PATCH: fold BIT_AND_EXPR's with ADDR_EXPR operands

Ollie Wild
Sun Sep 23 08:00:00 GMT 2007

On 9/20/07, Richard Guenther <> wrote:

> Otherwise the patch should be ok after you incorporated the changes
> (please re-post it).

I've attached an updated patch.  In addition to the changes we've
discussed, I converted the switch statements to if-else chains as I
believe this makes the code more legible.


2007-09-22  Ollie Wild  <>

    fold-const.c (fold_binary): Fold BIT_AND_EXPR's with a pointer operand.
    (get_pointer_modulus_and_residue): New function.

2007-09-22  Ollie Wild  <>

    gcc.dg/fold-bitand-1.c: New test.
    gcc.dg/fold-bitand-2.c: New test.
    gcc.dg/fold-bitand-3.c: New test.
    gcc.dg/fold-bitand-4.c: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fold-bitand.txt
URL: <>

More information about the Gcc-patches mailing list