diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-10 21:07:29 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-10 21:07:29 +0000 |
commit | 298ed4ca2295023e07a67569fa7db1c0544458ab (patch) | |
tree | f453f180c67bd5557cb1247536fbed10a0da4954 /gcc | |
parent | 0241311057c44fdbc8dc095824d46edc2d5196e4 (diff) | |
download | gcc-298ed4ca2295023e07a67569fa7db1c0544458ab.tar.gz |
2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
* expr.c (find_array_element): Reformat.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 38 |
2 files changed, 22 insertions, 20 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index eef75e2bbd7..9e5888f054e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 6ff6d10c6af..6f5aff8c6c0 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -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); |