[Patch, fortran] PR83118 - [8/9/10/11 Regression] Bad intrinsic assignment of class(*) array component of derived type

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Dec 26 09:04:06 GMT 2020


Hi Thomas,

Thanks for the review. You'll find answers to the questions below:

On Fri, 25 Dec 2020 at 11:04, Thomas Koenig <tkoenig@netcologne.de> wrote:

> First of all, merry Christmas everybody!
>
> Regarding the patch:
>
> > Regtests on FC33/x86_64 and the testcase is fixed with -m32. OK for
> master?
>
> It's OK by me.
>
> There is just one piece of code that I don't understand:
> ....snip....
>


> Could you maybe (for my personal education, and that of others who read
> this code) add a comment what "lss = gfc_ss_terminator" tests, and why
> it that one or the other post block is selected for adding the
> deallocation?  I simply don't know what this idiom means.
>

 lss == gfc_ss_terminator tells us that the lhs is a scalar and so the
scalarizer will not have generated a loop. Placing the deallocation of
allocatable components inside a scalarizer loop will generally cause
unintended outcomes :-)

Look at the end of the section "Using pre-generated expressions" in
https://gcc.gnu.org/wiki/GFortranScalarizer

Regards

Paul


More information about the Fortran mailing list