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: [patch, fortran, committed] Fix off-by-one in IBCLR/IBSET arg checking.


Shouldn't this be applied under the obvious rule to gcc 4.2
branch as well?
             Jack

On Tue, Jan 09, 2007 at 11:46:25PM -0800, Brooks Moses wrote:
> ----------------------------------------------------------------
> 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
> 
> 	* simplify.c (gfc_simplify_ibclr): Fix POS comparison.
> 	(gfc_simplify_ibset): Same.
> 
> ----------------------------------------------------------------
> 
> The bits in an N-bit integer are numbered from 0 to N-1; thus, this 
> error should be thrown when the POS argument is equal to N, as well as 
> when it's greater than N.
> 
> Committed to trunk as obvious.
> 
> - Brooks



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