------- Comment #24 from burnus at gcc dot gnu dot org  2008-01-24 14:14 -------
How about the following? If we need a variable as actual argument, one should
either have
  allocate(...., stat=istat)
or
  allocate(...., stat=istat, source=bar)
i.e. a ')' or a ','.  I think for "istat = ..." the flavor is not needed. What
do you think were it will break now?


Index: primary.c
===================================================================
--- primary.c   (Revision 131778)
+++ primary.c   (Arbeitskopie)
@@ -2534,7 +2534,8 @@ match_variable (gfc_expr **result, int e
        if (sym->attr.external || sym->attr.procedure
            || sym->attr.function || sym->attr.subroutine)
          flavor = FL_PROCEDURE;
-       else if (gfc_peek_char () != '(' || sym->ts.type != BT_UNKNOWN
+       else if (gfc_peek_char () != ')' || gfc_peek_char () != ','
+                || sym->ts.type != BT_UNKNOWN
                 || sym->attr.pointer || sym->as != NULL)
          flavor = FL_VARIABLE;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32760

Reply via email to