Commit 3b35a6f8 by H.J. Lu Committed by H.J. Lu

expr.c (find_array_element): Reformat.

2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* expr.c (find_array_element): Reformat.

From-SVN: r140248
parent a76ddc7b
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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment