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


Tobi,

+ static int
+ check_assumed_size_reference (gfc_symbol * sym, gfc_expr * e)



Why not make this a bool?


No problem. OK



+ {
+ 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?


because it is the upper bound of the last dimension of the last array ref that is missing in assumed size arrays.

<>+ /* 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.


OK

Thanks

Paul



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