[RFC, PATCH ] [DATAFLOW] Validating an address in auto-inc-dec

Pranav Bhandarkar pranav.bhandarkar@gmail.com
Mon May 28 21:58:00 GMT 2007


Hi,
I am working on a private port, wherein the constant addition /
subtraction in a post_modify  _must_  be less than a certain value.
For such a check I have defined GO_IF_LEGITIMATE_ADDRESS
appropriately. The problem is that attempt_change in auto-inc-dec
doesnt check if the new address is a valid memory address or not
resulting in an ICE in a later pass.

Therefore I wrote this patch, where in before replacing a memory
address and its modification by a constant by a post_modify, I first
check if the new address expression is going to be a valid expression.

Thanks,
Pranav

ChangeLog:
 * auto-inc-dec.c (attempt_change): Check if new_addr_pat is a
        valid memory address.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto-inc-dec-patch
Type: application/octet-stream
Size: 577 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070528/a29a4346/attachment.obj>


More information about the Gcc-patches mailing list