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: [FORTRAN PATCH] PR30400: ANY not accepted as FORALL mask


Dear All,

In the course of an extremely tedious meeting, I found a much more elegant solution than either Roger's or my previous offering. Please find it attached.

It regtests on Cygwin_NT/AMD64.

I cannot do any thing with it, so please run with it Roger.

Cheers

Paul

Index: gcc/fortran/match.c
===================================================================
*** gcc/fortran/match.c	(revision 121864)
--- gcc/fortran/match.c	(working copy)
*************** match_forall_iterator (gfc_forall_iterat
*** 3370,3376 ****
    where = gfc_current_locus;
    iter = gfc_getmem (sizeof (gfc_forall_iterator));
  
!   m = gfc_match_variable (&iter->var, 0);
    if (m != MATCH_YES)
      goto cleanup;
  
--- 3370,3376 ----
    where = gfc_current_locus;
    iter = gfc_getmem (sizeof (gfc_forall_iterator));
  
!   m = gfc_match_expr (&iter->var);
    if (m != MATCH_YES)
      goto cleanup;
  
*************** syntax:
*** 3415,3426 ****
    m = MATCH_ERROR;
  
  cleanup:
-   /* Make sure that potential internal function references in the
-      mask do not get messed up.  */
-   if (iter->var
-       && iter->var->expr_type == EXPR_VARIABLE
-       && iter->var->symtree->n.sym->refs == 1)
-     iter->var->symtree->n.sym->attr.flavor = FL_UNKNOWN;
  
    gfc_current_locus = where;
    gfc_free_forall_iterator (iter);
--- 3415,3420 ----

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