From: Janus Weil <janus@gcc.gnu.org>
To: Tobias Burnus <burnus@net-b.de>
Cc: gcc patches <gcc-patches@gcc.gnu.org>, gfortran <fortran@gcc.gnu.org>
Subject: Re: [Patch, Fortran] No-op Patch - a.k.a. FINAL wrapper update
Date: Fri, 30 Nov 2012 10:39:00 -0000 [thread overview]
Message-ID: <CAKwh3qgwC_QsO356OrdWfWc=_FB30GOf-+kfP2P7w_L+JmJqrg@mail.gmail.com> (raw)
In-Reply-To: <CAKwh3qjS1_nkFe8XrrwUhHj2h0fk_h4CJTGx6ugyk2Sgodnrhw@mail.gmail.com>
2012/11/30 Janus Weil <janus@gcc.gnu.org>:
> Hi,
>
>>> one thing that I do not like about your patch is the modification of
>>> "gfc_find_derived_vtab": You create two versions of it, one of which creates
>>> the vtab if it does not exist, while the other version does not do this.
>>> [...] can you explain to me why this would be necessary?
>>
>>
>> Well, strictly speaking it is not necessary. However, I use it in the
>> to-be-submitted calling part of the patch:
>>
>> else if (al->expr->ts.type == BT_DERIVED)
>> {
>> gfc_symbol *vtab = gfc_find_derived_vtab
>> (al->expr->ts.u.derived);
>> if (vtab)
>>
>> Here, I do not want to force the generation of a vtab which wouldn't
>> otherwise exist. Otherwise, one had to at least guard it by checks for
>> nonextensible derived types (sequence, bind(C)).
>
> I don't think it is a good idea to base the decision whether to call a
> finalizer on the presence of a vtab. In my version of the patch I
> introduced a routine 'gfc_is_finalizable' to perform this decision.
Forgot to mention: My last version of the patch is available at
http://gcc.gnu.org/ml/fortran/2012-11/msg00009.html
Btw, one prerequisite for the implementation of finalization would be
to have the following bug fixed:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207
(which is about automatic deallocation in the main program).
Cheers,
Janus
next prev parent reply other threads:[~2012-11-30 10:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 18:29 Tobias Burnus
2012-11-29 22:59 ` Janus Weil
2012-11-30 1:53 ` Tobias Burnus
2012-11-30 10:30 ` Janus Weil
2012-11-30 10:39 ` Janus Weil [this message]
2012-11-30 12:29 ` Tobias Burnus
2012-12-02 22:54 ` Janus Weil
2018-10-15 9:02 ` [PATCH,FORTRAN] Fix memory leak in finalization wrappers Bernhard Reutner-Fischer
2021-10-27 21:39 ` Bernhard Reutner-Fischer
2021-10-28 23:58 ` Bernhard Reutner-Fischer
2021-11-05 18:46 ` Mikael Morin
2021-11-05 22:08 ` Bernhard Reutner-Fischer
2021-11-06 12:04 ` Mikael Morin
2021-11-06 23:56 ` Bernhard Reutner-Fischer
2021-11-07 12:32 ` Mikael Morin
2021-11-14 19:53 ` Bernhard Reutner-Fischer
2021-11-06 10:30 ` Mikael Morin
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='CAKwh3qgwC_QsO356OrdWfWc=_FB30GOf-+kfP2P7w_L+JmJqrg@mail.gmail.com' \
--to=janus@gcc.gnu.org \
--cc=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@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).