PR 24207 may interest you
Paul THOMAS
paulthomas2@wanadoo.fr
Thu Oct 6 08:24:00 GMT 2005
Steve,
The condition needs to exclude use AND host association.
The patch below puts your case right without breaking anything.
I am unable to contemplate the formal arguments of a public procedure
at the moment - I am sitting with a PC on my lap in a conference.
However, I do not think that the condition there needs extending.
Best regards
Paul T
*** gcc/gcc/fortran/resolve.c.wrong Wed Oct 5 10:43:32 2005
--- gcc/gcc/fortran/resolve.c Thu Oct 6 09:29:36 2005
*************** resolve_symbol (gfc_symbol * sym)
*** 4330,4335 ****
--- 4330,4336 ----
{
if (arg->sym
&& arg->sym->ts.type == BT_DERIVED
+ && !arg->sym->ts.derived->attr.use_assoc
&& !gfc_check_access(arg->sym->ts.derived->attr.access,
arg->sym->ts.derived->ns->default_access))
{
*************** resolve_symbol (gfc_symbol * sym)
*** 4432,4438 ****
{
for (nl = sym->namelist; nl; nl = nl->next)
{
! if (!gfc_check_access(nl->sym->attr.access,
nl->sym->ns->default_access))
gfc_error ("PRIVATE symbol '%s' cannot be member of "
"PUBLIC namelist at %L", nl->sym->name,
--- 4433,4443 ----
{
for (nl = sym->namelist; nl; nl = nl->next)
{
! if (!nl->sym->attr.use_assoc
! &&
! !(sym->ns->parent == nl->sym->ns)
! &&
! !gfc_check_access(nl->sym->attr.access,
nl->sym->ns->default_access))
gfc_error ("PRIVATE symbol '%s' cannot be member of "
"PUBLIC namelist at %L", nl->sym->name,
More information about the Fortran
mailing list