Hi Yuao,
thanks for your patch. I have two nits:
* There is no diagnostic for -std=f2018 (or lower);
can you add the 'gfc_notify_std (GFC_STD_F2023' ?
* I have a minor documentation nit; current wording is
at https://gcc.gnu.org/onlinedocs/gfortran/C_005fF_005fPOINTER.html
Namely, ...
Yuao Ma wrote:
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -3368,10 +3368,10 @@ Fortran 2003 and later
@table @asis
@item @emph{Synopsis}:
-@code{CALL C_F_POINTER(CPTR, FPTR[, SHAPE])}
+@code{CALL C_F_POINTER(CPTR, FPTR[, SHAPE, LOWER])}
@item @emph{Description}:
-@code{C_F_POINTER(CPTR, FPTR[, SHAPE])} assigns the target of the C pointer
+@code{C_F_POINTER(CPTR, FPTR[, SHAPE, LOWER])} assigns the target of the C
pointer
@var{CPTR} to the Fortran pointer @var{FPTR} and specifies its shape.
I think some wording like the following is missing:
"For an array @var{FPTR}, the lower bounds are specified by @var{LOWER} if present
and otherwise equal to 1."
...
@item @emph{Standard}:
Fortran 2003 and later
I think we should append ", with @var{LOWER} argument Fortran 2023 and
later" to "Standard".
* * *
Otherwise, it looks good to me. Thanks for your GCC contributions!
Tobias
PS: Eventually, we should update https://gcc.gnu.org/gcc-16/changes.html
for the accumulated Fortran changes … [That's the
https://gcc.gnu.org/about.html#git ]