diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8cf0bc3ebdf..7634dcee40e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2007-01-09 Brooks Moses + + * simplify.c (gfc_simplify_ibclr): Fix POS comparison. + (gfc_simplify_ibset): Same. + 2007-01-09 Brooks Moses PR 30381 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 82005f1d58f..d4cdc9ebf73 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -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);