summaryrefslogtreecommitdiff
path: root/gcc/fortran/array.c
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-21 17:16:25 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-21 17:16:25 +0000
commitac68a56d7362d45aeff09cfb6df6d81baf1ae9c5 (patch)
tree032738a33558c2f031c61d1b082f0d21774c8326 /gcc/fortran/array.c
parent4d3bc044b09207e8a063874eca6c72be49cf65e4 (diff)
downloadgcc-ac68a56d7362d45aeff09cfb6df6d81baf1ae9c5.tar.gz
* array.c (gfc_insert_constructor): Avoid redundant call to
mpz_comp. Add 2004 to copyright years. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r--gcc/fortran/array.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index bfe8aafc960..a7081d84305 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;