simplify.c (gfc_simplify_ibclr): Fix POS comparison.

* simplify.c (gfc_simplify_ibclr): Fix POS comparison.
(gfc_simplify_ibset): Same.

From-SVN: r120636
This commit is contained in:
Brooks Moses 2007-01-10 07:42:56 +00:00 committed by Brooks Moses
parent f1dcb9bf3b
commit 3775c3dc9a
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
* simplify.c (gfc_simplify_ibclr): Fix POS comparison.
(gfc_simplify_ibset): Same.
2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
PR 30381

View File

@ -1280,7 +1280,7 @@ gfc_simplify_ibclr (gfc_expr * x, gfc_expr * y)
k = gfc_validate_kind (x->ts.type, x->ts.kind, false);
if (pos > gfc_integer_kinds[k].bit_size)
if (pos >= gfc_integer_kinds[k].bit_size)
{
gfc_error ("Second argument of IBCLR exceeds bit size at %L",
&y->where);
@ -1386,7 +1386,7 @@ gfc_simplify_ibset (gfc_expr * x, gfc_expr * y)
k = gfc_validate_kind (x->ts.type, x->ts.kind, false);
if (pos > gfc_integer_kinds[k].bit_size)
if (pos >= gfc_integer_kinds[k].bit_size)
{
gfc_error ("Second argument of IBSET exceeds bit size at %L",
&y->where);