This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran, committed] Fix off-by-one in IBCLR/IBSET arg checking.
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: Brooks Moses <brooks dot moses at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 10 Jan 2007 14:33:57 -0800
- Subject: Re: [patch, fortran, committed] Fix off-by-one in IBCLR/IBSET arg checking.
- References: <45A499D1.3010806@codesourcery.com> <20070110223100.GA32288@bromo.msbb.uc.edu>
On Wed, Jan 10, 2007 at 05:31:00PM -0500, Jack Howarth wrote:
>
> 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.
>
> Shouldn't this be applied under the obvious rule to gcc 4.2
> branch as well?
> Jack
No. Brooks is fixing a oversight in his previous patch on trunk.
--
Steve