In TS 18508, the second summy argument of co_reduce was named
"operator." In the Fortran 2018 standard, the corresponding argument
has the name "operation." GFortran accepts the non-standard keyword
argument name "operator" and rejects the standard name "operation."
% cat co_reduce.f90
implicit none
logical :: co_all= .true.
call co_reduce(co_all, operator=both)
call co_reduce(co_all, operation=both)
contains
logical pure function both(lhs,rhs)
logical, intent(in) :: lhs, rhs
both = lhs .and. rhs
end function
end
% gfortran -fcoarray=single co_reduce.f90
co_reduce.f90:4:40:
4 | call co_reduce(co_all, operation=both)
| 1
Error: Cannot find keyword named 'operation' in call to 'co_reduce' at (1)
% gfortran --version
GNU Fortran (Homebrew GCC 11.2.0) 11.2.0