This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH,fortran] Fix PR 31244
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 Oct 2007 23:51:06 +0100
- Subject: Re: [PATCH,fortran] Fix PR 31244
- References: <20070924221122.GA3766@troutmask.apl.washington.edu>
I was clearing my mail backlog, and apparently this patch wasn't
reviewed, sorry Steve!
I had an alternative patch that put a sane limit on
the repeat count and documented this limit in manual.
Personally, I preferred this patch.
Sanity check: you prefer the patch you submitted to the patch adding
a limit, did I get it right?
2007-09-24 Steven G. Kargl <firstname.lastname@example.org>
* decl.c (free_value): Clear mpz value.
(top_val_list): Convert variable from unsigned int to mpz_t.
* gfortran.h (gfc_data_value): Ditto.
* resolve.c (struct values): Ditto
(next_data_value): Use mpz_t variable.
OK, with the following modification:
- signed int tmp;
- msg = gfc_extract_int (expr, &tmp);
+ if (expr->ts.type == BT_INTEGER)
+ mpz_set (tail->repeat, expr->value.integer);
I think, to be consistent with what gfc_extract_int() did, we should
add a check that the expression is an EXPR_CONSTANT of type
BT_INTEGER, and otherwise call gfc_error(). Maybe this is already
checked somewhere, in which case I've missed it.
Also, a formatting question. In the following, is the blank line
consistent with GCC coding style? (I don't think so, and never put one.)
-resolve_data (gfc_data * d)
+resolve_data (gfc_data *d)
if (resolve_data_variables (d->var) == FAILURE)