This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR86328 - [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements

Hi Paul,

> The attached patch fixes PR86328 and PR86760. The regression was
> caused by my commit r252949.
> The parts of the patch that fix the PRs are in trans.c and
> trans-array.c. The problem was caused by fixing the expressions that
> would provide the 'span' in gfc_build_array_ref, since the latter
> expected a variable expression. A number of evaluations of component
> array elements were producing pre blocks that were not added and so
> the temporaries were not being evaluated.
> The fix is to pass the COMPONENT_REF and extract the 'span' directly from it.
> The rest of the patch arises from PR86328 comment #12. In fact, this
> took most of the time that I have spent on these PRs :-(  Having done
> this, I felt that I had to include this part of the patch in the
> submission. However, I have found a host of related bugs, which I will
> put together in one PR.
> My inclination is to commit the patch without the parts in resolve.c,
> trans-expr.c and pr86328_12.f90, especially for 8-branch. I am open to
> suggestions for 9-branch.
> Bootstraps and regtests on FC28/x68_64 - OK for 8- and 9-branches?

the patch is ok for trunk from my side. I also agree that it makes
sense to backport those parts that address the regression to 8-branch.
Thanks for the fix!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]