This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54884] [4.8 Regression] Externally used PRIVATE module procedure wrongly marked as TREE_PUBLIC()=0
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Oct 2012 07:42:10 +0000
- Subject: [Bug fortran/54884] [4.8 Regression] Externally used PRIVATE module procedure wrongly marked as TREE_PUBLIC()=0
- Auto-submitted: auto-generated
- References: <bug-54884-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54884
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-10-10 07:42:10 UTC ---
There is the following code in resolve.c's resolve_variable:
if (specification_expr && sym->attr.access == ACCESS_PRIVATE
&& !sym->attr.function && !sym->attr.use_assoc
&& gfc_current_ns->proc_name && gfc_current_ns->proc_name->attr.function)
sym->attr.public_used = 1;
I don't have a GCC 4.8 build at hand, but I think the issue is that
sym->attr.access == ACCESS_PRIVATE
is false. I assume that sym->attr.access == ACCESS_UNKNOWN; one probably needs
to check instead:
&& (sym->ns->default_access == ACCESS_PRIVATE
|| (sym->ns->default_access == ACCESS_UNKNOWN
&& gfc_option.flag_module_private)))
* * *
(In reply to comment #1)
> Duplicate of pr54221 (see comment #5)?
Duplicate of PR54221: No, that's a completely separate issue.
Duplicate of PR54221 comment 5: Well, it links to the Andrew's bug-reporting
email, hence, it is a duplicate.