This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32760] [4.3 Regression] Error defining subroutine named PRINT
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2008 14:14:50 -0000
- Subject: [Bug fortran/32760] [4.3 Regression] Error defining subroutine named PRINT
- References: <bug-32760-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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