From e1e24dc19fdafe3b4f3546036c7ffe27e7fa458e Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Thu, 8 Mar 2007 09:09:38 +0000 Subject: re PR fortran/31011 ([4.2 and 4.1 only] Incorrect error: parameter array sections) 2007-03-08 Paul Thomas PR fortran/31011 * expr.c (find_array_section): Correct arithmetic for section size. 2007-03-08 Paul Thomas PR fortran/31011 * gfortran.dg/parameter_array_section_2.f90: New test. From-SVN: r122689 --- gcc/fortran/expr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index dbe5188..06f4d20 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1137,8 +1137,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) } /* Calculate the number of elements and the shape. */ - mpz_abs (tmp_mpz, stride[d]); - mpz_div (tmp_mpz, stride[d], tmp_mpz); + 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]); -- cgit v1.1