[Fortran, Patch] Passing function pointer to co_reduce
Mikael Morin
mikael.morin@sfr.fr
Wed Jul 15 12:59:00 GMT 2015
Hello,
Le 13/07/2015 17:31, Alessandro Fanfarillo a écrit :
> Dear all,
>
> during the implementation of co_reduce in OpenCoarrays I noticed that
> GFortran passes a pointer to function instead of the function name to
> co_reduce.
>
More exactly there are two address operators ('&') in a row (the dumping
removes one of them).
> Currently the compiler produces the following call:
>
> _gfortran_caf_co_reduce (&desc.0, &simple_reduction, 0, 0, 0B, 0B, 0, 0);
>
> where simple_reduction is the pure function that has to be used by co_reduce.
>
> The attached patch seems to fix the issue, any comments?
>
The patch itself looks good to me.
A ChangeLog entry should be provided with it.
The test is missing the usual dejagnu pattern matching directives to
check the generated code.
Do you have commit rights?
Mikael
More information about the Fortran
mailing list