From: Harald Anlauf <anlauf@gmx.de>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR fortran/101536 - ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:7324
Date: Fri, 23 Jul 2021 21:08:11 +0200 [thread overview]
Message-ID: <trinity-e976e193-f409-4326-9ea0-b0c4d3dca29b-1627067291420@3c-app-gmx-bs28> (raw)
In-Reply-To: <449b9a29-4df4-9a5b-7675-a11db7aebe1f@codesourcery.com>
Hi Tobias,
> > However, an additional plain check on e->rank != 0 also in the
> > CLASS cases fixes the original issue as well as your example:
> [...]
> > And regtests ok. :-)
> > See attached updated patch.
>
> I think you still need to remove the 'return true;' from
> the 'if (e->rank != 0 && e->ts.type == BT_CLASS' block – to
> fall through to the e->rank check after the block.
> (When 'return true;' is gone, the '{' and '}' can also be removed.)
>
> Reason: Assume 'CLASS(...) x'. In this case, 'x' is a scalar.
> And even after calling gfc_add_class_array_ref it remains
> a scalar and e->rank == 0.
>
> Or in other words: I think with your current patch,
> class(u) :: z
> f = size (z)
> is wrongly accepted without an error.
did you really check that? My related testing succeeded without
and with the return (which was in the original commit by Paul).
I have nevertheless followed your advice to remove the return
statement, extended the testcase and regtested again.
Committed as https://gcc.gnu.org/g:e314cfc371d8b2405a1d81e51b90f9fb24b9061f
Thanks,
Harald
prev parent reply other threads:[~2021-07-23 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 20:22 Harald Anlauf
2021-07-22 16:47 ` Tobias Burnus
2021-07-22 19:03 ` Harald Anlauf
2021-07-23 7:58 ` Tobias Burnus
2021-07-23 19:08 ` Harald Anlauf [this message]
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=trinity-e976e193-f409-4326-9ea0-b0c4d3dca29b-1627067291420@3c-app-gmx-bs28 \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias@codesourcery.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).