This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR25029 unbounded assumed size array references
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: patch <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Thu, 05 Jan 2006 22:40:19 +0100
- Subject: Re: [patch, fortran] PR25029 unbounded assumed size array references
- References: <43B62E5E.4060401@wanadoo.fr>
Paul Thomas wrote:
> Bubblestrapped and regtested on FC3/Athlon1700.
>
> OK for trunk and 4.1?
I still have two questions, see below.
> + static int
> + check_assumed_size_reference (gfc_symbol * sym, gfc_expr * e)
Why not make this a bool?
> + {
> + gfc_ref * ref;
> + int dim;
> + int last = 1;
> +
> + if (need_full_assumed_size
> + || !(sym->as && sym->as->type == AS_ASSUMED_SIZE))
> + return 0;
> +
> + for (ref = e->ref; ref; ref = ref->next)
> + if (ref->type == REF_ARRAY)
> + for (dim = 0; dim < ref->u.ar.as->rank; dim++)
> + last = (ref->u.ar.end[dim] == NULL) && (ref->u.ar.type == DIMEN_ELEMENT);
Um, why the inner loop?
> + /* Look for bad assumed size array references in argument expressions
> + of elemental and array valued intrinsic procedures. Since this is
> + called from procedure resolution functions, it only recurses at
> + operators. */
> + static bool
> + resolve_assumed_size_actual (gfc_expr *e)
Blank line between comment and function please.
- Tobi
:REVIEWMAIL: