diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2010-05-14 21:02:26 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2010-05-14 21:02:26 +0000 |
commit | c13af44bcc9d9435b4a537d189e5d3b6edffe7fe (patch) | |
tree | 6266668ab1db306def0cb9225197661fe247de58 /gcc/fortran/interface.c | |
parent | c4e64f39d9f8ce4af60222415b522a4b07f8b86c (diff) | |
download | gcc-c13af44bcc9d9435b4a537d189e5d3b6edffe7fe.zip gcc-c13af44bcc9d9435b4a537d189e5d3b6edffe7fe.tar.gz gcc-c13af44bcc9d9435b4a537d189e5d3b6edffe7fe.tar.bz2 |
re PR fortran/44135 (Negative array bounds lead to spurious warning)
2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/44135
* gfortran.dg/actual_array_interface_2.f90: New test.
2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/44135
* fortran/interface.c (get_sym_storage_size): Use signed instead of
unsigned mpz_get_?i routines.
From-SVN: r159415
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 38adf9b..4bcc63e 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1645,8 +1645,8 @@ get_sym_storage_size (gfc_symbol *sym) || sym->as->lower[i]->expr_type != EXPR_CONSTANT) return 0; - elements *= mpz_get_ui (sym->as->upper[i]->value.integer) - - mpz_get_ui (sym->as->lower[i]->value.integer) + 1L; + elements *= mpz_get_si (sym->as->upper[i]->value.integer) + - mpz_get_si (sym->as->lower[i]->value.integer) + 1L; } return strlen*elements; |