This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/34760] PRIVATE variable not allowed as STAT variable in ALLOCATE



------- 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


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