[Bug fortran/34760] PRIVATE variable not allowed as STAT variable in ALLOCATE
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 14 00:43:00 GMT 2008
------- Comment #2 from burnus at gcc dot gnu dot org 2008-01-13 22:49 -------
match_variable is called for "istat" in the subroutine. For the first match, it
is FL_UNKNOWN and then - without PRIVATE - it is set to FL_VARIABLE. With
public/private, it remains FL_UNKNOWN.
As for ALLOCATE sym->attr.flavor == FL_VARIABLE is check, it fails therefore as
soon as the variable has been marked as public/private.
match_variable contains:
switch (sym->attr.flavor)
{
[...]
case FL_UNKNOWN:
if (sym->attr.access == ACCESS_PUBLIC
|| sym->attr.access == ACCESS_PRIVATE)
break;
if (gfc_add_flavor (&sym->attr, FL_VARIABLE,
sym->name, NULL) == FAILURE)
return MATCH_ERROR;
break;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34760
More information about the Gcc-bugs
mailing list