From: Andre Vehreschild <vehre@gmx.de>
To: Mikael Morin <mikael.morin@sfr.fr>
Cc: GCC-Patches-ML <gcc-patches@gcc.gnu.org>,
GCC-Fortran-ML <fortran@gcc.gnu.org>
Subject: Re: [Patch, fortran, pr65894, v1] [6 Regression] severe regression in gfortran 6.0.0
Date: Fri, 08 May 2015 11:54:00 -0000 [thread overview]
Message-ID: <20150508135417.0e15f8d1@gmx.de> (raw)
In-Reply-To: <554B9447.9060701@sfr.fr>
Hi Mikael,
at first I tried to fix this issue with the scalarizer, too, but I could not
grasp how the scalarizer was working. Do you have any documentation, how it is
meant to be? I mean, I have read the comments in the code, but those are sparse
and the multitude of routines the scalarizer is split up into doesn't help
either.
Anyway, because not a single line of code from my patch is left, this has to be
your patch now. Thanks for finding a better solution.
I do not have the privileges to do a review so I can't help you there. Good
luck finding a reviewer.
Regards,
Andre
On Thu, 07 May 2015 18:35:19 +0200
Mikael Morin <mikael.morin@sfr.fr> wrote:
> Le 07/05/2015 11:52, Andre Vehreschild a écrit :
> > Hi all,
> >
> > my work on pr60322 caused a regression on trunk. This patch fixes it. The
> > regression had two causes:
> > 1. Not taking the correct attribute for BT_CLASS objects with allocatable
> > components into account (chunk 1), and
> > 2. taking the address of an address (chunk 2). When a class or derived typed
> > scalar object is to be returned as a reference and a scalarizer is
> > present, then the address of the address of the object was returned. The
> > former code was meant to return the address of an array element for which
> > taking the address was ok. The patch now prevents taking the additional
> > address when the object is scalar.
> >
> Hello,
>
> The "chunk 2" fix should go in gfc_conv_expr, so that
> gfc_add_loop_ss_code's "can_be_null_ref" condition matches the one in
> gfc_conv_expr. Both functions work together, if references are
> generated in gfc_add_loop_ss_code, they should be used as reference in
> gfc_conv_expr. Same if values are generated.
>
> About the condition of the first chunk, I don't understand what it's
> good for.
>
> So I propose the attached patch instead.
> It creates a new function to decide between reference and value, so that
> gfc_add_loop_ss_code and gfc_conv_expr are kept in sync.
> As the new function needs information about the dummy argument, the
> dummy symbol is saved to a new field in gfc_ss_info.
> And the "chunk 1" condition is reverted to its previous state.
> The testcase is yours.
>
> regression tested on x86_64-unknown-linux-gnu. OK for trunk?
>
> Mikael
>
>
>
>
>
--
Andre Vehreschild * Email: vehre ad gmx dot de
next prev parent reply other threads:[~2015-05-08 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 9:52 Andre Vehreschild
2015-05-07 16:35 ` Mikael Morin
2015-05-08 11:54 ` Andre Vehreschild [this message]
2015-05-08 14:04 ` Mikael Morin
2015-05-08 15:25 ` Steve Kargl
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=20150508135417.0e15f8d1@gmx.de \
--to=vehre@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=mikael.morin@sfr.fr \
/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).