This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR43366 - add invalid-diagnostic for poly assignment


> (Side remark: That's Janus' email which didn't make it past GCC's mail
> server.)

... for whatever reason. I hope this one will make it through.

>>>> Fortran 2008 permits assignment to polymorphic variables with some
>>>> constraints. The patch, which was sitting in my tree, adds diagnostic to
>>>> reject invalid use. For valid code, it runs into the existing
>>>> not-yet-implemented error.
>>>> Build + regtested on x86-64-gnu-linux.
>>>> OK for the trunk?
>> a few comments:
>> 1) How about a test case?
> I added one - and fixed an issue with gfc_expr_attr for codimension.

Ok, thanks. I hadn't noticed the codimension problem.

>> 2) Why not leave in the comment with the F03 reference for now, since
>> you're not modifying that part?
> Well, the F2003 reference is wrong (its about something else).

No, it's not. F03: is about intrinsic assignments, just like F08:

However, F03: is not (maybe this is what you were looking at?).

> That's not
> surprising as assignment to an allocatable polymorphic variable is a Fortran
> 2008 feature. (Reading it as F2008 section number leads one to the intrinsic
> assignment section, which is fine.)
>> 3) You might wanna modify the FIXME note, since your patch addresses
>> at least part of it (namely the invalid-rejection). The only missing
>> item now is to allow the things that are valid in F08, I guess.
> I have now updated the comment - and made the error message clearer.

Ok, looks better to me. After the realloc-on-assign is fully
implemented, one should replace the "not implemented" error by a
gfc_notify_std, of course (where the F03: reference would still
make sense).

> Attached is the updated patch.
> OK for the trunk?

Yes, fine with me. Thanks for the patch.

>> Btw, the patch at
>> was half-approved by Mikael, but is still waiting for your agreement,
>> Tobias, since you had some criticism in the PR ...
> Sorry for the delay. However, it seems as if I have now a bit more time for
> GCC/gfortran. I try to get an overview about the August backlog and reply to
> the missing items; in particular to that patch.

That would be great, it's been hanging in there for a while now ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]