[Patch, Fortran] PR54884 - Fix TREE_PUBLIC()=0 regression for module procedures
Tobias Burnus
burnus@net-b.de
Wed Oct 17 10:02:00 GMT 2012
In GCC 4.8, module variables/procedures are marked as TREE_PUBLIC() if
they are PRIVATE and not publicly visible used in PUBLIC procedures; the
latter happens either via generic interfaces or via specification
expressions. (The bug is old [early 4.8] but due to a recent follow up
patch, the chance to run into this issue has increased.)
This patch adds the public_use attribute logic (also) to
resolve_function, before it was only in resolve_symbol.
When doing so, I realized that it was also set for "other" as the
specification_expr variable wasn't properly reset. I fixed that but I
had also to add a few additional "specification_expr = true" as the
current code only handled gfc_resolve_array_spec by chance.
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: private-proc-resolve.diff
Type: text/x-patch
Size: 10436 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20121017/cf4879fc/attachment.bin>
More information about the Fortran
mailing list