On Sat, Jul 26, 2025 at 09:14:43PM +0800, Yuao Ma wrote:
>
> + add_sym_4s ("split", GFC_ISYM_SPLIT, CLASS_IMPURE,
> + BT_UNKNOWN, 0, GFC_STD_F2023,
> + gfc_check_split, NULL, gfc_resolve_split,
> + "string", BT_CHARACTER, dc, REQUIRED, INTENT_IN,
> + "set", BT_CHARACTER, dc, REQUIRED, INTENT_IN,
> + "pos", BT_INTEGER, di, REQUIRED, INTENT_INOUT,
> + "back", BT_LOGICAL, dl, OPTIONAL, INTENT_IN);
> +
This looks incorrect. SPLIT is a simple subroutine. (Yes,
I know gfortran does not have the simple concept, yet).
See Fortran 2023, 15.8:
A simple procedure is also a pure procedure and is subject to the
constraints for pure procedures (15.7). A simple procedure can also
be an elemental procedure.
Shouldn't you have CLASS_PURE?
The rest of the patch looks Ok.
--
Steve