From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: fix simplification of intrinsics IBCLR and IBSET [PR106557]
Date: Mon, 22 Aug 2022 11:52:42 +0200 [thread overview]
Message-ID: <426b9ffe-93af-b961-26d5-8632cd885666@orange.fr> (raw)
In-Reply-To: <trinity-8cf16654-0cf6-472a-ab09-919261efb696-1661022680044@3c-app-gmx-bs01>
Le 20/08/2022 à 21:11, Harald Anlauf via Fortran a écrit :
> Dear all,
>
> the simplification of the TRANSFER intrinsic produces a
> redundant representation of the result, one in expr->value
> and another in expr->representation.string. This is done
> to ensure a safe "round-trip" for nested TRANSFER.
>
> In a subsequent use of this result we either need to make
> sure that both parts stay consistent, or drop the latter
> part.
>
> The simplifications of IBCLR and IBSET do a gfc_copy_expr
> of their argument x and modify only the former part.
> Depending on context, either value.integer or
> representation.string (if non-NULL) are used later,
> leading to surprising results.
>
> A conservative approach to fix this PR is to simply
> drop the unneeded representation.string in the
> simplification of the intrinsics IBCLR and IBSET,
> see attached patch. (A quick glance did not turn up
> other intrinsics affected the same way.)
>
> Regtested on x86_64-pc-linux-gnu. OK for mainline?
>
Yes, thanks.
prev parent reply other threads:[~2022-08-22 9:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 19:11 Harald Anlauf
2022-08-22 9:52 ` Mikael Morin [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=426b9ffe-93af-b961-26d5-8632cd885666@orange.fr \
--to=morin-mikael@orange.fr \
--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).