* expr.c (gfc_copy_shape_excluding): Change && to ||.
authorSteven G. Kargl <kargls@comcast.net>
Fri, 4 Mar 2005 17:09:18 +0000 (17:09 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Fri, 4 Mar 2005 17:09:18 +0000 (17:09 +0000)
From-SVN: r95891

gcc/fortran/ChangeLog
gcc/fortran/expr.c

index 7507564b4385d11d625f7aa5c7c4d949bed21f20..b612122dd4fec1779db2860fbcc1049ce4b7a563 100644 (file)
@@ -1,3 +1,7 @@
+Steven G. Kargl  <kargls@comcast.net>
+
+       * expr.c (gfc_copy_shape_excluding): Change && to ||.
+
 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
        * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
index 5867f9bfaa59517b26177237288577c5b77df228..f4a4b589b1fe29f62cae77f71b627a4ff7883387 100644 (file)
@@ -352,7 +352,7 @@ gfc_copy_shape_excluding (mpz_t * shape, int rank, gfc_expr * dim)
 
   n = mpz_get_si (dim->value.integer);
   n--; /* Convert to zero based index */
-  if (n < 0 && n >= rank)
+  if (n < 0 || n >= rank)
     return NULL;
 
   s = new_shape = gfc_get_shape (rank-1);