On Sat, Aug 31, 2019 at 10:12:55AM -0700, Steve Kargl wrote: > On Sat, Aug 31, 2019 at 09:56:52AM -0700, Steve Kargl wrote: > > On Sat, Aug 31, 2019 at 04:59:03PM +0100, Paul Richard Thomas wrote: > > > + > > > + /* Match a SELECT RANK statement. */ > > > + > > > + match > > > + gfc_match_select_rank (void) > > > + { > > > + gfc_expr *expr1, *expr2 = NULL; > > > + match m; > > > + char name[GFC_MAX_SYMBOL_LEN]; > > > + gfc_symbol *sym, *sym2; > > > + gfc_namespace *ns = gfc_current_ns; > > > + gfc_array_spec *as; > > > > (snip) > > > > > + if (expr2->expr_type != EXPR_VARIABLE > > > + || !(as && as->type == AS_ASSUMED_RANK)) > > > + gfc_error_now ("The SELECT RANK selector at %C must be an > > > assumed " > > > + "rank variable"); > > > > If an error occurs, should this set m = MATCH_ERROR and goto cleanup? > > OR, set m = MATCH_ERROR, free expr1 and expr2 and return m? > > IOW, if an error occurs, why should gfortran continue to match select rank? > > > > Still looking at the remaining part of patch. > > > > There's another gfc_error_now several lines down. Does the > same early return apply there as well. > > Also, found > > Index: gcc/fortran/parse.c > =================================================================== > *** gcc/fortran/parse.c (revision 275242) > --- gcc/fortran/parse.c (working copy) > + > + /* At this point, we're got a nonempty select block. */ > > s/we're/we've >
Copy-n-paste may corrupt this, but the change is removing 1 trailing whitespace space and leaving a remaining trailing whitespace. *************** resolve_procedure_expression (gfc_expr* *** 1866,1872 **** /* Check that name is not a derived type. */ ! static bool is_dt_name (const char *name) { --- 1866,1872 ---- /* Check that name is not a derived type. */ ! static bool is_dt_name (const char *name) { -- Steve