On Sat, Jul 26, 2025 at 11:57:50PM +0800, Yuao Ma wrote:
>
> On 7/26/2025 11:25 PM, Steve Kargl wrote:
> > 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?
>
> That was indeed my oversight. Initially, I believed split had an argument
> with INTENT_INOUT, which suggested a side effect. However, I then discovered
> move_alloc also has an INOUT argument, but with the CLASS_PURE type. This
> has been corrected in the new patch.
Thanks.
> > The rest of the patch looks Ok.
>
> Thanks for the review! If the new patch looks good for trunk and there are
> no other objections, could you please help me merge it?
I haven't committed a patch since the transition from subversion
to git. I'm not paid to learn yet-another-SCCS. I've become
fairly well versed with 'rm -rf gcc && git clone URL gcc'.
Hopefully, someone else can do the commit for you or you can
get 'write after approval' access to the source tree.
--
steve