diff mbox series

[fortran,wwwdocs] Fix name of argument to CO_REDUCE

Message ID 1ebfa54c-b2c5-7cd3-9168-c19a778cd3ce@netcologne.de
State New
Headers show
Series [fortran,wwwdocs] Fix name of argument to CO_REDUCE | expand

Commit Message

Thomas Koenig Nov. 7, 2021, 6:18 p.m. UTC
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

Harald Anlauf Nov. 7, 2021, 9:01 p.m. UTC | #1
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
diff mbox series

Patch

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 5974b9ba..7d0c04f9 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -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> -->
diff --git a/htdocs/gcc-12/porting_to.html b/htdocs/gcc-12/porting_to.html
index 9154d7b3..42179c11 100644
--- a/htdocs/gcc-12/porting_to.html
+++ b/htdocs/gcc-12/porting_to.html
@@ -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>
 -->