From: Thomas Koenig <tkoenig@netcologne.de>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: handle explicit-shape specs with constant bounds [PR105954]
Date: Sun, 26 Jun 2022 10:43:15 +0200 [thread overview]
Message-ID: <5d6f01a6-fa94-2d03-4257-c65cfda3074a@netcologne.de> (raw)
In-Reply-To: <trinity-ea5cca86-9a4a-47f5-889c-a862eb562044-1655752252939@3c-app-gmx-bap34>
Hello Harald,
> after simplification of constant bound expressions of an explicit
> shape spec of an array, we need to ensure that we never obtain
> negative extents. In some cases this did happen, and we ICEd
> as we hit an assert that this should never happen...
>
> The original testcase by Gerhard exhibited this for sizeof()
> of a derived type with an array component, but the issue is
> more fundamental and affects other intrinsics during
> simplification.
>
> A straightforward solution "fixes up" the upper bound in the
> shape spec when it is known to be below lower bounds minus one.
>
> Regtested on x86_64-pc-linux-gnu. OK for mainline?
OK. Thanks for the patch!
Regards
Thomas
prev parent reply other threads:[~2022-06-26 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 19:10 Harald Anlauf
2022-06-26 8:43 ` Thomas Koenig [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=5d6f01a6-fa94-2d03-4257-c65cfda3074a@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=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).