From: Daniel Kraft <d@domob.eu>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: Fortran List <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, Fortran] PR fortran/35681: First part, fix ELEMENTAL dependency handling for MVBITS
Date: Mon, 27 Oct 2008 22:04:00 -0000 [thread overview]
Message-ID: <49063189.1060804@domob.eu> (raw)
In-Reply-To: <339c37f20810271402m2755fc9fn3f58acfddf99bcc4@mail.gmail.com>
Paul Richard Thomas wrote:
> Daniel,
>
> I'm a bit pole-axed with the daytime job right now, so my reply must be short.
>
> I have to say that I'me really puzzled about this:
>
>> 6) I could not find a test to verify this (not even one that uses
>> gfc_conv_elemental_dependencies) in a quick trial, but I believe the
>> handling of the temporary there was wrong, in that it was free'd (if
>> allocated on the heap) *before* it was used with internal_unpack, because
>> gfc_trans_create_temp_array added the temporary clean-up code to se->post
>> and the unpack-call was added to se->post later. In my opinion, this is
>> some rather general problem with how post-commands are usually added to
>> other post blocks; shouldn't they be added to the top usually rather than to
>> the bottom, to get some sort of "nested" scope with inner most pairs of
>> pre/post? Well, for now I changed this behaviour inside
>> gfc_conv_elemental_dependencies, which corrected problems I got with MVBITS
>> tests.
>>
>
> The code from the first assignement in elemental_subroutine_3.f90,
> which was the first test of this function gives:
>
...
>
> As you can see, atmp.3.data is assigned to the stack but it is not
> freed either before or after being unpacked. This code, at least is
> OK.
Indeed it is, but it would not have been (at least I think so) if the
array was allocated and not on the stack; however, as I wrote, I did not
manage to build a test that really produced invalid code this way (not
even one that used gfc_conv_elemental_dependencies...)
Thanks for your comments, they are very welcome :)
Yours,
Daniel
--
Done: Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou
next prev parent reply other threads:[~2008-10-27 21:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 19:43 Daniel Kraft
2008-10-27 21:29 ` Paul Richard Thomas
2008-10-27 22:04 ` Daniel Kraft [this message]
2008-10-28 22:05 ` Mikael Morin
2008-10-28 22:31 ` Daniel Kraft
2008-10-29 10:00 ` Paul Richard Thomas
2008-10-31 15:54 ` Daniel Kraft
2008-11-01 12:57 ` Paul Thomas
2008-11-01 13:33 ` Daniel Kraft
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=49063189.1060804@domob.eu \
--to=d@domob.eu \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=paul.richard.thomas@gmail.com \
/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).