This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran, pr78395, v1] [OOP] error on polymorphic assignment
- From: Andre Vehreschild <vehre at gmx dot de>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>, GCC-Fortran-ML <fortran at gcc dot gnu dot org>
- Date: Sun, 20 Nov 2016 15:23:16 +0100
- Subject: Re: [PATCH, Fortran, pr78395, v1] [OOP] error on polymorphic assignment
- Authentication-results: sourceware.org; auth=none
- References: <20161118180017.476fcdaf@vepi2> <CAKwh3qjWr=ym8pMd9xX0hw5cU7MzsG6EeTj88uQEG7LumYHv1Q@mail.gmail.com>
Hi Janus,
thanks for the review. Committed to trunk as r242637. Will wait one week before
committing to 6.
Regards,
Andre
On Sat, 19 Nov 2016 16:14:54 +0100
Janus Weil <janus@gcc.gnu.org> wrote:
> Hi Andre,
>
> > When checking the shortened example in comment #3 one gets a segfault,
> > because v6 is not allocated explicitly. The initial example made sure, that
> > v6 was allocated.
>
> sorry, I guess that's my fault. I blindly removed the allocate
> statement when looking for a reduced test case for the compile-time
> error.
>
>
> > Btw, when using the in gcc-7 available
> > polymorphic assign, then v6 is actually auto-allocated and the program runs
> > fine. So what are your opinions on the auto-allocation issue?
>
> I suspect that auto-allocation does not apply to defined assignment,
> but I'm not fully sure. Looking in the F08 standard, it seems to be
> mentioned in 7.2.1.3, but not in 7.2.1.4.
>
> As Thomas mentioned, you could take that question to c.l.f. to get a
> more qualified answer and/or open a follow-up PR for it.
>
>
> > This patch fixes the wrong error messages in both gcc-7 and gcc-6.
> > Bootstraped and regtested on x86_64-linux/F23 for gcc-7 and -6. Ok for trunk
> > and gcc-6?
>
> Yes, looks good to me (at least for trunk; gcc-6 if you like).
>
> Thanks for the patch,
> Janus
--
Andre Vehreschild * Email: vehre ad gmx dot de