public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Janus Weil <janus@gcc.gnu.org>
Cc: gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR86328 - [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements
Date: Sat, 01 Sep 2018 11:58:00 -0000	[thread overview]
Message-ID: <CAGkQGiLi4+tPeSXQ7D-5MpWwWXL4H0YshTaqHmRWXhTNShx91g@mail.gmail.com> (raw)
In-Reply-To: <CAKwh3qhznWaCRKUoywxiDLj6yDDhB9m_6s=wA_bxFz6Z-mQH+Q@mail.gmail.com>

Hi Janus,

Thanks for the review. I decided to commit just the parts that address
the regression to both branches. Assignment to polymorphic variables
is in such a mess that I did not consider it sensible to apply part of
a fragment of Band Aid. I will raise a PR for the bugs that I know of.

Committed to 8-branch as r264027 and trunk as r264008

Cheers

Paul


On 29 August 2018 at 20:18, Janus Weil <janus@gcc.gnu.org> wrote:
> 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!
>
> Cheers,
> Janus



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

  reply	other threads:[~2018-09-01 11:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 15:55 Paul Richard Thomas
2018-08-29 19:19 ` Janus Weil
2018-09-01 11:58   ` Paul Richard Thomas [this message]
2018-09-01 17:30 Dominique d'Humières

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGkQGiLi4+tPeSXQ7D-5MpWwWXL4H0YshTaqHmRWXhTNShx91g@mail.gmail.com \
    --to=paul.richard.thomas@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=janus@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).