]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* simplify.c (gfc_simplify_ibclr): Fix POS comparison.
authorbrooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2007 07:42:56 +0000 (07:42 +0000)
committerbrooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2007 07:42:56 +0000 (07:42 +0000)
(gfc_simplify_ibset): Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120636 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/simplify.c

index 8cf0bc3ebdf1d0ecc776378eed3b685cd460e2b1..7634dcee40ee0f3b1138e750dc9a83e84b0df388 100644 (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
index 82005f1d58f5e9eb9fd89b664e9a1eea8a60614f..d4cdc9ebf7369a3a6515c7be1272dabc020f2895 100644 (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);