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.


Steve Kargl wrote:
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?

No. Brooks is fixing a oversight in his previous patch on trunk.

Only partly an oversight -- it's a pre-existing bug, though I should have included the fix with the other patch since it's in the same code. (My patch did convert its manifestation from a "Result out of range" error to an ICE, but it's a bug in either case.)


Since the other patch is a bug-fix, I was intending to apply it to 4.2 after a regression check and the customary one-week delay; I'll include this in with it then.

- Brooks


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