https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103054
Bug ID: 103054
Summary: [f18] Gfortran accepts invalid and rejects valid
co_reduce argument keyword name
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: damian at sourceryinstitute dot org
Target Milestone: ---
In TS 18508, the second summy argument to co_reduce had the keyword name
"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
⌁74% [rouson:~] % 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