This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, Patch, pr66911, gcc-5, v1] ICE on allocate character with source as a derived type component
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: Andre Vehreschild <vehre at gmx dot de>, GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>, GCC-Fortran-ML <fortran at gcc dot gnu dot org>
- Date: Sun, 3 Apr 2016 12:22:31 -0700
- Subject: Re: [Fortran, Patch, pr66911, gcc-5, v1] ICE on allocate character with source as a derived type component
- Authentication-results: sourceware.org; auth=none
- References: <20160403173357 dot 1a2b03b7 at vepi2>
On 04/03/2016 08:33 AM, Andre Vehreschild wrote:
> Hi all,
>
> attached patch fixes the ICE when using a deferred length char array as
> source= expression in an allocate for complicated source= expressions.
> Before the patch the compiler was relying on having the string length
> available in the ts of the expression, but when the expression is
> sufficiently complicated it is not set there. In trunk the problem does
> not arise, because the source= expression is evaluated in more cases.
> In gcc-5 this is not available without doing a major rewrite of the
> allocate() statement's conv-routine. Therefore this small portion of
> extra code reliably does the trick and takes the string_length from the
> se.string_length now.
>
> Bootstrapped and regtested ok on x86_64-linux-gnu/F23. Ok for
> gcc-5-branch?
>
> Regards,
> Andre
>
Yes, OK
Thanks for your work.
Jerry