[PATCH, Fortran, pr78395, v1] [OOP] error on polymorphic assignment
Andre Vehreschild
vehre@gmx.de
Sun Nov 20 14:34:00 GMT 2016
Whoops, hit send to fast. Here's the patch committed.
- Andre
On Sun, 20 Nov 2016 15:23:16 +0100
Andre Vehreschild <vehre@gmx.de> wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 3230 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161120/2464d15e/attachment.bin>
More information about the Fortran
mailing list