From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Andre Vehreschild <vehre@gmx.de>
Cc: GCC-Fortran-ML <fortran@gcc.gnu.org>,
GCC-Patches-ML <gcc-patches@gcc.gnu.org>,
Katherine Rasmussen <krasmussen@lbl.gov>,
Brad Richardson <brad@archaeologic.codes>
Subject: Re: [Fortran, Patch, Coarray, PR 37336] Fix crash in finalizer when derived type coarray is already freed.
Date: Thu, 28 Sep 2023 19:21:12 +0100 [thread overview]
Message-ID: <CAGkQGiJH8U4seeA9pjwSmno=_xss3BySykV=sBbGitx25p+byw@mail.gmail.com> (raw)
In-Reply-To: <20230928144505.77e03a8e@vepi2>
Hi Andre,
The patch looks fine to me. Since you mention it in the comment, is it
worth declaring the derived type 'foo' in a module and giving it a
final routine?
Thanks for the patch.
Paul
On Thu, 28 Sept 2023 at 13:45, Andre Vehreschild via Fortran
<fortran@gcc.gnu.org> wrote:
>
> Hi all,
>
> attached patch fixes a crash in coarray programs when an allocatable derived
> typed coarray was freed explicitly. The generated cleanup code did not take
> into account, that the coarray may have been deallocated already. The patch
> fixes this by moving the statements accessing components inside the derived type
> into the block guard by its allocated check.
>
> Regtested ok on f37/x86_64. Ok for master?
>
> Regards,
> Andre
> --
> Andre Vehreschild * Email: vehre ad gmx dot de
next prev parent reply other threads:[~2023-09-28 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 12:45 Andre Vehreschild
2023-09-28 18:21 ` Paul Richard Thomas [this message]
2023-09-29 10:01 ` Andre Vehreschild
2023-09-29 12:38 ` Paul Richard Thomas
2023-09-29 13:13 ` Andre Vehreschild
2023-09-30 13:16 ` Andre Vehreschild
2023-10-01 19:38 ` Paul Richard Thomas
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='CAGkQGiJH8U4seeA9pjwSmno=_xss3BySykV=sBbGitx25p+byw@mail.gmail.com' \
--to=paul.richard.thomas@gmail.com \
--cc=brad@archaeologic.codes \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=krasmussen@lbl.gov \
--cc=vehre@gmx.de \
/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).