This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31011] Incorrect error: parameter array sections
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2007 09:41:39 -0000
- Subject: [Bug fortran/31011] Incorrect error: parameter array sections
- References: <bug-31011-14178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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