[fortran,wwwdocs] Fix name of argument to CO_REDUCE
Commit Message
Hello world,
the attached patches fix the name of the function argument to CO_REDUCE
to conform to Fortran 2018 instead of the TR.
This is a user-visible change, so I have put this both into changes.html
and porting_to.html.
Regression-tested. OK for trunk?
Best regards
Thomas
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date: 2021-11-07 15:38:35 +0100
Fix keyword name for co_reduce.
gcc/fortran/ChangeLog:
* intrinsic.c (add_subroutines): Change keyword "operator"
to the correct one, "operation".
* check.c (gfc_check_co_reduce): Change OPERATOR to
OPERATION in error messages.
gcc/testsuite/ChangeLog:
* gfortran.dg/co_reduce_2.f90: New test.
* gfortran.dg/coarray_collective_16.f90: Change OPERATOR
to OPERATION.
* gfortran.dg/coarray_collective_9.f90: Likewise.
Co-authored by: Steve Kargl <steve@gcc.gnu.org>
Comments
Hi Thomas,
Am 07.11.21 um 19:18 schrieb Thomas Koenig via Fortran:
> Hello world,
>
> the attached patches fix the name of the function argument to CO_REDUCE
> to conform to Fortran 2018 instead of the TR.
>
> This is a user-visible change, so I have put this both into changes.html
> and porting_to.html.
>
> Regression-tested. OK for trunk?
>
> Best regards
>
> Thomas
>
> Author: Thomas Koenig <tkoenig@gcc.gnu.org>
> Date: 2021-11-07 15:38:35 +0100
>
> Fix keyword name for co_reduce.
>
> gcc/fortran/ChangeLog:
>
> * intrinsic.c (add_subroutines): Change keyword "operator"
> to the correct one, "operation".
> * check.c (gfc_check_co_reduce): Change OPERATOR to
> OPERATION in error messages.
>
> gcc/testsuite/ChangeLog:
>
> * gfortran.dg/co_reduce_2.f90: New test.
> * gfortran.dg/coarray_collective_16.f90: Change OPERATOR
> to OPERATION.
> * gfortran.dg/coarray_collective_9.f90: Likewise.
>
> Co-authored by: Steve Kargl <steve@gcc.gnu.org>
>
Steve added an update to gcc/fortran/intrinsic.texi in the PR which is
missing here.
OK if it is committed with the above.
Thanks for the patch!
Harald
@@ -157,6 +157,12 @@ a work-in-progress.</p>
have been fixed, and an extensive set of new conformance test cases
has been added.
</li>
+ <li>
+ GCC 12 now uses <code>OPERATION</code> as the name of the function to
+ the <code>CO_REDUCE</code> intrinsic for the pairwise reduction, thus
+ conforming to the Fortran 2018 standard. Previous versions
+ used <code>OPERATOR</code>, which conformed to TS 18508.
+ </li>
</ul>
<!-- <h3 id="go">Go</h3> -->
@@ -57,7 +57,13 @@ is no longer accepted and you need to add a cast to it like:
<!--
<h2 id="fortran">Fortran language issues</h2>
-->
+<h3 id="co_reduce_operation">Argument name for CO_REDUCE</h3>
+<p>
+GCC 12 now uses <code>OPERATION</code> as the name of the function to
+the <code>CO_REDUCE</code> intrinsic for the pairwise reduction, thus
+conforming to the Fortran 2018 standard. Previous versions
+used <code>OPERATOR</code>, which conformed to TS 18508.
<!--
<h2 id="links">Links</h2>
-->