[Fortran, Patch, pr66911, gcc-5, v1] ICE on allocate character with source as a derived type component

Jerry DeLisle jvdelisle@charter.net
Sun Apr 3 19:22:00 GMT 2016


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



More information about the Gcc-patches mailing list