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]
Other format: [Raw text]

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


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.

Attachment: auto-inc-dec-patch
Description: Binary data


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