From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [Patch] Fortran: Avoid var initialization in interfaces [PR54753]
Date: Sat, 2 Oct 2021 21:19:05 +0200 [thread overview]
Message-ID: <sjabba$h63$1@ciao.gmane.io> (raw)
In-Reply-To: <bb8cefcd-7bd5-fdb6-54c8-567fb19f4a1c@net-b.de>
Hi Tobias,
Am 02.10.21 um 20:29 schrieb Tobias Burnus:
> On 02.10.21 20:01, Sandra Loosemore wrote:
>> On 9/29/21 2:53 AM, Tobias Burnus wrote:
>>> There are three issues, this patch solves the first:
>>> * reject-valid issue due to adding the initializer also to a dummy
>>> argument which is in an INTERFACE block. Having initializers in
>>> INTERFACE blocks is pointless and causes for the attached testcase
>> the bogus error:
>>> "Assumed-rank variable y at (1) may only be used as actual argument"
>>> ...
>> This has indeed allowed me to make progress on adding the diagnostic,
>> but I'm seeing some test regressions on x86_64-linux-gnu that are due
>> to this patch alone:
>>
>> FAIL: gfortran.dg/default_initialization_3.f90 -O0 execution test
>
> I do not see this error. Can you double check that you indeed use the
> posted patch:
>
> https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580483.html –
> and nothing else, e.g., an earlier draft?
Sandra is right. Actually I do see that regression, too.
The default initialization is missing in F1, see dump-tree:
__attribute__((fn spec (". R w w ")))
integer(kind=4) master.0.f1 (integer(kind=8) __entry, struct t1 * d2,
struct t1 * d1)
{
integer(kind=4) res;
integer(kind=4) __result_master.0.f1;
integer(kind=4) res.0 [value-expr: __result_master.0.f1];
if (d1 != 0B)
{
{
struct t1 t1.1;
t1.1.i = 7;
*d1 = t1.1;
}
}
The latter "if (d1 != 0B)" block gets removed by your change, and
this is not good.
> (I still have to commit it; it was approved by Harald, but he also he
> preferred to have a second view, I decided to wait until tomorrow/Monday
> before committing it.)
Well, I did not regtest, only read the patch and trust that you did your
homework!
> Tobias
Harald
next prev parent reply other threads:[~2021-10-02 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 8:53 Tobias Burnus
2021-09-29 20:10 ` Harald Anlauf
2021-10-01 18:50 ` Harald Anlauf
2021-10-02 18:01 ` Sandra Loosemore
2021-10-02 18:29 ` Tobias Burnus
2021-10-02 19:19 ` Harald Anlauf [this message]
2021-10-02 19:56 ` Tobias Burnus
2021-10-02 20:28 ` Harald Anlauf
2021-10-02 22:40 ` Sandra Loosemore
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='sjabba$h63$1@ciao.gmane.io' \
--to=anlauf@gmx.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).