public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andre Vehreschild <vehre@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR67171 - [6 regression] sourced allocation
Date: Sun, 25 Oct 2015 17:17:00 -0000	[thread overview]
Message-ID: <20151025164719.077974ce@vepi2> (raw)
In-Reply-To: <CAGkQGi+_=KKSJdG+AW6XDmt=wOpa3s43nzy6n+ABJtNLPgFA1w@mail.gmail.com>

Hi Paul,

I had a look at your patch, especially at the allocate() specific part
and have nothing serious to complain about. I would love to see more
comments to help beginners find there way in the code, but that's a
thing I will never get. :-)

Therefore, from my perspective ok for trunk and thanks for the patch.

Regards,
	Andre

On Sat, 24 Oct 2015 15:08:30 +0200
Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:

> Dear All,
> 
> This patch does four things:
> (i) On deallocating class components, the vptr is set to point to the
> vtable of the declared type;
> (ii) When digging out the last class reference, a NULL is returned if
> the allocatable component is to the right of a part reference with
> non-zero rank, so that the resulting ICE is removed. The previous
> modification takes care of these cases for gfc_reset_vptr and
> gfc_reset_len;
> (iii) gfc_reset_vptr has been simplified by the use of
> gfc_get_vptr_from_expr; and
> (iv) All variable expressions for the source are passed to
> gfc_trans-assignment, so that array sections work correctly.
> 
> I see that Andre has already reserved the testcase
> allocate_with_source_10, for the pending patch that I undertook to
> review, so I will change this to #12 on submission
> 
> OK for trunk?
> 
> Cheers
> 
> Paul
> 
> 2015-01-24  Paul Thomas  <pault@gcc.gnu.org>
> 
>     PR fortran/67171
>     * trans-array.c (structure_alloc_comps): On deallocation of
>     class components, reset the vptr to the declared type vtable
>     and reset the _len field of unlimited polymorphic components.
>     *trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
>     allocatable component references to the right of part reference
>     with non-zero rank and return NULL.
>     (gfc_reset_vptr): Simplify this function by using the function
>     gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
>     (gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
>     NULL return.
>     * trans-stmt.c (gfc_trans_allocate): Rely on the use of
>     gfc_trans_assignment if expr3 is a variable expression since
>     this deals correctly with array sections.
> 
> 2015-01-24  Paul Thomas  <pault@gcc.gnu.org>
> 
>     PR fortran/67171
>     * gfortran.dg/allocate_with_source_10.f03: New test


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 

  parent reply	other threads:[~2015-10-25 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24 13:46 Paul Richard Thomas
2015-10-24 15:14 ` Paul Richard Thomas
2015-10-25 17:17 ` Andre Vehreschild [this message]
2015-10-25 17:46   ` Paul Richard Thomas
2015-10-26  1:04   ` 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=20151025164719.077974ce@vepi2 \
    --to=vehre@gmx.de \
    --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).