https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117798
--- Comment #2 from kargls at comcast dot net ---
I think that Fortran 2023 may break the ABI for gfortran.
F2008 has "13.7.65 GET COMMAND ([COMMAND, LENGTH, STATUS])"
Currently, libgfortran/intrinsics/args.c has
void
get_command_i4 (char *command, GFC_INTEGER_4 *length, GFC_INTEGER_4 *status,
gfc_charlen_type command_len)
F2018 and F2023 have
16.9.82 GET_COMMAND ([COMMAND, LENGTH, STATUS, ERRMSG])
So, we need to add an ERRMSG variable, which changes the interface to
void
get_command_i4 (char *command, GFC_INTEGER_4 *length, GFC_INTEGER_4 *status,
char *errmsg, gfc_charlen_type command_len, gfc_charlen_type
errmsg_len)
Currently, for the code in comment #1, gdb shows the call
Breakpoint 1, _gfortrani_get_command_i4 (command=0x0, length=0x0, status=0x0,
command_len=1) at ../../../gccx/libgfortran/intrinsics/args.c:197
and the code contains
if (command == NULL && length == NULL && status == NULL)
return; /* No need to do anything. */
whoops.