https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68846

--- Comment #6 from mirco <mirco.valentini at polimi dot it> ---
Hi all, 
I spent some time today working on this bug. I found a small modification that
allows to build without errors and that seems to work (I did a very preliminary
test).

At the moment I'm working with "gfortran 7.0.1 20170219"

The modification is just:

! ===========================================================================
file: resolve.c
line: 10690

at the end of the function "resolve_ptr_fcn_assign" add the foolowing lines:
!----------------------------------------------------------------------------
(*code)->expr1->symtree->n.sym->attr.dummy = 0;
(*code)->expr1->symtree->n.sym->attr.intent = INTENT_UNKNOWN;
=============================================================================


The reason is that the temporary pointer used to store the result of the
pointer function should never inherit the "dummy" attribute.

Is there any drawback with this modification? I don't know very well the code
of gfortran and for this reason I don't know the possible implications of this
modification.

Regards,
Mirco

Reply via email to