diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-06-21 19:23:52 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-06-21 19:23:52 +0200 |
commit | f5e440e11d2a06873d52c3443f624d537788600d (patch) | |
tree | b8e9dc37ac0f6a4b0c5731888cce991d658387c9 /gcc/fortran | |
parent | da4f9e3b4db0404582e4328bd33a7977f3e8dccc (diff) | |
download | gcc-f5e440e11d2a06873d52c3443f624d537788600d.zip gcc-f5e440e11d2a06873d52c3443f624d537788600d.tar.gz gcc-f5e440e11d2a06873d52c3443f624d537788600d.tar.bz2 |
resolve.c (resolve_symbol): Add comment in function body.
* resolve.c (resolve_symbol): Add comment in function body.
(check_data_variable): Change type of mark to ar_type, adapt code
accordingly.
From-SVN: r83443
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d0e4e87..4677f39 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> + * resolve.c (resolve_symbol): Add comment in function body. + (check_data_variable): Change type of mark to ar_type, adapt code + accordingly. + +2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> + * array.c (gfc_insert_constructor): Avoid redundant call to mpz_comp. Add 2004 to copyright years. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index b19721f..77ac3d4 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -3724,6 +3724,9 @@ resolve_symbol (gfc_symbol * sym) } } + /* Assumed size arrays and assumed shape arrays must be dummy + arguments. */ + if (sym->as != NULL && (sym->as->type == AS_ASSUMED_SIZE || sym->as->type == AS_ASSUMED_SHAPE) @@ -3945,7 +3948,7 @@ check_data_variable (gfc_data_variable * var, locus * where) mpz_t size; mpz_t offset; try t; - int mark = 0; + ar_type mark = AR_UNKNOWN; int i; mpz_t section_index[GFC_MAX_DIMENSIONS]; gfc_ref *ref; @@ -3982,14 +3985,14 @@ check_data_variable (gfc_data_variable * var, locus * where) switch (ref->u.ar.type) { case AR_FULL: - mark = 1; + mark = AR_FULL; break; case AR_SECTION: ar = &ref->u.ar; /* Get the start position of array section. */ gfc_get_section_index (ar, section_index, &offset); - mark = 2; + mark = AR_SECTION; break; default: @@ -4024,17 +4027,17 @@ check_data_variable (gfc_data_variable * var, locus * where) /* Assign initial value to symbol. */ gfc_assign_data_value (var->expr, values.vnode->expr, offset); - if (mark == 1) + if (mark == AR_FULL) mpz_add_ui (offset, offset, 1); /* Modify the array section indexes and recalculate the offset for next element. */ - else if (mark == 2) + else if (mark == AR_SECTION) gfc_advance_section (section_index, ar, &offset); mpz_sub_ui (size, size, 1); } - if (mark == 2) + if (mark == AR_SECTION) { for (i = 0; i < ar->dimen; i++) mpz_clear (section_index[i]); |