------- Comment #1 from pault at gcc dot gnu dot org 2007-03-07 09:41 -------
confirmed - this is an arithmetic error in expr.c(find_array_section).
The following fixes the problem, although it has not yet been regtested.
Paul
Index: gcc/fortran/expr.c
===================================================================
*** gcc/fortran/expr.c (révision 122159)
--- gcc/fortran/expr.c (copie de travail)
*************** find_array_section (gfc_expr *expr, gfc_
*** 1137,1144 ****
}
/* Calculate the number of elements and the shape. */
! mpz_abs (tmp_mpz, stride[d]);
! mpz_div (tmp_mpz, stride[d], tmp_mpz);
mpz_add (tmp_mpz, end[d], tmp_mpz);
mpz_sub (tmp_mpz, tmp_mpz, ctr[d]);
mpz_div (tmp_mpz, tmp_mpz, stride[d]);
--- 1137,1143 ----
}
/* Calculate the number of elements and the shape. */
! mpz_set (tmp_mpz, stride[d]);
mpz_add (tmp_mpz, end[d], tmp_mpz);
mpz_sub (tmp_mpz, tmp_mpz, ctr[d]);
mpz_div (tmp_mpz, tmp_mpz, stride[d]);
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-03-01 18:02:09 |2007-03-07 09:41:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31011