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]

Re: [RFA] A small fix for IRA


Jie Zhang wrote:
When working on a GCC bug, I found this. We should use `-' instead of `+', otherwise "use + 1" would fall out of the array boundary. Is it OK?


Yes, that is definitely a typo. So your patch is ok. Thanks for finding this.

P.S. By the way, the comparison is not necessary at all because use < n_operands is always true and if constraints[use][0]=='%' than use + 1 < n_operands. But it is good to have it for readability.


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