[Bug fortran/25072] non PURE function used in For-All
pault at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jun 21 20:44:00 GMT 2006
------- Comment #7 from pault at gcc dot gnu dot org 2006-06-21 20:39 -------
Here's the patch (or rather, one of three that I have found!):
Paul
Index: gcc/fortran/primary.c
===================================================================
*** gcc/fortran/primary.c (revision 114823)
--- gcc/fortran/primary.c (working copy)
*************** match_variable (gfc_expr ** result, int
*** 2282,2287 ****
--- 2282,2299 ----
break;
case FL_UNKNOWN:
+ /* If a putative variable is followed by a left parenthesis
+ but does not have the attribute of dimension, this cannot
+ be a variable. */
+ if (!sym->attr.dimension
+ && !equiv_flag
+ && sym->ts.type != BT_CHARACTER)
+ {
+ gfc_gobble_whitespace ();
+ if (gfc_peek_char () == '(')
+ return MATCH_NO;
+ }
+
if (gfc_add_flavor (&sym->attr, FL_VARIABLE,
sym->name, NULL) == FAILURE)
return MATCH_ERROR;
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25072
More information about the Gcc-bugs
mailing list