This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran, committed] Fix off-by-one in IBCLR/IBSET arg checking.
- From: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- To: Brooks Moses <brooks dot moses at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 10 Jan 2007 17:31:00 -0500
- Subject: Re: [patch, fortran, committed] Fix off-by-one in IBCLR/IBSET arg checking.
- References: <45A499D1.3010806@codesourcery.com>
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