]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
expr.c (find_array_element): Reformat.
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 10 Sep 2008 21:07:29 +0000 (21:07 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 10 Sep 2008 21:07:29 +0000 (14:07 -0700)
2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

* expr.c (find_array_element): Reformat.

From-SVN: r140248

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

index eef75e2bbd79f862c0081f3c93b0fdb00fff5312..9e5888f054e9246ad3437bac0a887bcfce59bcfb 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * expr.c (find_array_element): Reformat.
+
 2008-09-10  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/37420
index 6ff6d10c6af9ab052b05c45c71274fe94b8120db..6f5aff8c6c0914f7b790217792c26268782e5b5a 100644 (file)
@@ -1036,13 +1036,12 @@ find_array_element (gfc_constructor *cons, gfc_array_ref *ar,
        }
         /* Check the bounds.  */
       if ((ar->as->upper[i]
-            && ar->as->upper[i]->expr_type == EXPR_CONSTANT
-            && mpz_cmp (e->value.integer,
-                        ar->as->upper[i]->value.integer) > 0)
-               ||
-         (ar->as->lower[i]->expr_type == EXPR_CONSTANT
-            && mpz_cmp (e->value.integer,
-                        ar->as->lower[i]->value.integer) < 0))
+          && ar->as->upper[i]->expr_type == EXPR_CONSTANT
+          && mpz_cmp (e->value.integer,
+                      ar->as->upper[i]->value.integer) > 0)
+         || (ar->as->lower[i]->expr_type == EXPR_CONSTANT
+             && mpz_cmp (e->value.integer,
+                         ar->as->lower[i]->value.integer) < 0))
        {
          gfc_error ("Index in dimension %d is out of bounds "
                     "at %L", i + 1, &ar->c_where[i]);
@@ -1061,19 +1060,18 @@ find_array_element (gfc_constructor *cons, gfc_array_ref *ar,
       mpz_mul (span, span, tmp);
     }
 
-    for (nelemen = mpz_get_ui (offset); nelemen > 0; nelemen--)
-      {
-        if (cons)
-         {
-           if (cons->iterator)
-             {
-               cons = NULL;
-             
-               goto depart;
-             }
-           cons = cons->next;
-         }
-      }
+  for (nelemen = mpz_get_ui (offset); nelemen > 0; nelemen--)
+    {
+      if (cons)
+       {
+         if (cons->iterator)
+           {
+             cons = NULL;
+             goto depart;
+           }
+         cons = cons->next;
+       }
+    }
 
 depart:
   mpz_clear (delta);