This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] PR25029 unbounded assumed size array references


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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]