This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, Tobias Burnus <burnus at net-b dot de>
- Date: Wed, 19 Sep 2012 22:12:31 +0200
- Subject: Re: [Patch, fortran] PR46897 - [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign
- References: <CAGkQGiLUJSqmV-CdnbiK=iVMsfgP62a3X28kDsCsXUDjPTNa3A@mail.gmail.com> <50294461.2070704@sfr.fr> <CAGkQGiL9Y9b1JCYSE7ftv5J=WOfF80MTMhH3CaSrgKShD4JSjg@mail.gmail.com> <502A0F81.7060106@sfr.fr> <CAGkQGi+wqPFad_oZBOv3fCZFpr17rbA1B_kU5AC-d9NXwc3KOg@mail.gmail.com> <CAGkQGiKUfxLdbGaC0Xa=xs9BZiybvJBBvyjnEPLnoqrjyZUTyw@mail.gmail.com> <50576FE4.7040008@sfr.fr> <CAGkQGiKc9qLtrRQuA1Hx2pUpTrV6YoOwNEADoGFUvCNK0pa2Hg@mail.gmail.com>
On 19/09/2012 20:46, Paul Richard Thomas wrote:
>>> + || comp1->attr.proc_pointer_comp
>> That one doesn't look right.
>
> Why not?
It skips any component containing a procedure pointer subcomponent.
Actually, from looking at parse.c where the flag is set, it seems that
the flag is only set for derived types, not for components, so it's not
that bad; the condition never triggers.
>
>> `this_code' should be cleared, otherwise it is used in the next iteration.
> I'll check that this is not done in gfc_free_statements (no source to
> hand at the moment) - I believe that it is.
To be clear, the _pointer_ should be cleared:
this_code = NULL;
Mikael