This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] PR25018 - ICE in parameter initialization - and PR25029 - assumed size pointer assignments


I have just noticed that in the course of cleaning up, updating and reapplying my patches that this part is doubled up in the submitted patch. Obviously, this will be corrected before committing.

Cheers

Paul

*************** gfc_check_pointer_assign (gfc_expr * lva
*** 1986,1991 ****
--- 2006,2051 ----
return FAILURE;
}
+ if (rvalue->symtree->n.sym
+ && rvalue->symtree->n.sym->as
+ && rvalue->symtree->n.sym->as->type == AS_ASSUMED_SIZE)
+ {
+ gfc_ref * ref;
+ int dim = 0;
+ int last = 0;
+ for (ref = rvalue->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;
+ if (last)
+ {
+ gfc_error ("The upper bound in the last dimension of the "
+ "assumed_size array on the rhs of the pointer "
+ "assignment at %L must be set", &rvalue->where);
+ return FAILURE;
+ }
+ }
+





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