diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-06-21 19:16:25 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-06-21 19:16:25 +0200 |
commit | da4f9e3b4db0404582e4328bd33a7977f3e8dccc (patch) | |
tree | 032738a33558c2f031c61d1b082f0d21774c8326 /gcc/fortran/array.c | |
parent | 979bf9a120b592b4b7002424a44bf4b9b0854596 (diff) | |
download | gcc-da4f9e3b4db0404582e4328bd33a7977f3e8dccc.zip gcc-da4f9e3b4db0404582e4328bd33a7977f3e8dccc.tar.gz gcc-da4f9e3b4db0404582e4328bd33a7977f3e8dccc.tar.bz2 |
array.c (gfc_insert_constructor): Avoid redundant call to mpz_comp.
* array.c (gfc_insert_constructor): Avoid redundant call to
mpz_comp. Add 2004 to copyright years.
From-SVN: r83442
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index bfe8aaf..a7081d8 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1,5 +1,5 @@ /* Array things - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Contributed by Andy Vaught This file is part of GCC. @@ -605,6 +605,7 @@ gfc_insert_constructor (gfc_expr * base, gfc_constructor * c1) { gfc_constructor *c, *pre; expr_t type; + int t; type = base->expr_type; @@ -617,12 +618,13 @@ gfc_insert_constructor (gfc_expr * base, gfc_constructor * c1) { if (type == EXPR_ARRAY) { - if (mpz_cmp (c->n.offset, c1->n.offset) < 0) + t = mpz_cmp (c->n.offset, c1->n.offset); + if (t < 0) { pre = c; c = c->next; } - else if (mpz_cmp (c->n.offset, c1->n.offset) == 0) + else if (t == 0) { gfc_error ("duplicated initializer"); break; |