Regression

Alessandro Fanfarillo fanfarillo.gcc@gmail.com
Sat Jul 18 13:07:00 GMT 2015


Hello,

the patch for the problem you mentioned has been already applied by
Mikael Morin https://gcc.gnu.org/ml/fortran/2015-07/msg00112.html.
Yes, OpenCoarrays expects two arguments from that function (which is
supposed to be a pure function).

Cheers

2015-07-18 14:53 GMT+02:00 Paul Richard Thomas <paul.richard.thomas@gmail.com>:
> Dear Alessandro,
>
> I presume that your recent patch (17th July) is the cause of:
>
> FAIL: gfortran.dg/coarray_collectives_16.f90   -O
> scan-tree-dump-times original "_gfortran_caf_co_reduce \\(&desc..,
> &fr, 4, _gfortran_caf_num_images \\(0, -1\\), &stat1, errmesg1, 0,
> 6\\);" 1
> FAIL: gfortran.dg/coarray_collectives_16.f90   -O
> scan-tree-dump-times original "_gfortran_caf_co_reduce \\(&val2, &gz,
> 0, 4, &stat2, errmesg2, 0, 7\\);" 1
> FAIL: gfortran.dg/coarray_collectives_16.f90   -O
> scan-tree-dump-times original "_gfortran_caf_co_reduce \\(&desc..,
> &hc, 1, res, &stat3, errmesg3, 99, 8\\);" 1
>
> The tree dump shows that the second argument is being passed without
> the address operator, which was the purpose of your patch. Patching
> thusly:
>
> Index: gcc/testsuite/gfortran.dg/coarray_collectives_16.f90
> ===================================================================
> *** gcc/testsuite/gfortran.dg/coarray_collectives_16.f90    (revision 225943)
> --- gcc/testsuite/gfortran.dg/coarray_collectives_16.f90    (working copy)
> *************** contains
> *** 33,38 ****
>     end function hc
>   end program test
>
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&desc.., &fr, 4, _gfortran_caf_num_images \\(0, -1\\), &stat1,
> errmesg1, 0, 6\\);" 1 "original" } }
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&val2, &gz, 0, 4, &stat2, errmesg2, 0, 7\\);" 1 "original" } }
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&desc.., &hc, 1, res, &stat3, errmesg3, 99, 8\\);" 1 "original" } }
> --- 33,38 ----
>     end function hc
>   end program test
>
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&desc.., fr, 4, _gfortran_caf_num_images \\(0, -1\\), &stat1,
> errmesg1, 0, 6\\);" 1 "original" } }
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&val2, gz, 0, 4, &stat2, errmesg2, 0, 7\\);" 1 "original" } }
> ! ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce
> \\(&desc.., hc, 1, res, &stat3, errmesg3, 99, 8\\);" 1 "original" } }
>
>
> makes the regression go away - are the calls now correct? single.c
> shows the second argument to be void * (*opr) (void *, void *), so it
> looks OK for a function with two arguments.
>
> Cheers
>
> Paul



More information about the Fortran mailing list