From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [COMMITTED] ada: Remove useless validity suppression for attribute Input
Date: Mon, 7 Nov 2022 09:38:28 +0100 [thread overview]
Message-ID: <20221107083828.150145-1-poulhies@adacore.com> (raw)
From: Piotr Trojanek <trojanek@adacore.com>
Attributes 'Input and 'Read are similar, but only the 'Read denotes a
subprogram with parameter of mode OUT where operand validity checks need
to be suppressed.
Cleanup related to fix for attributes 'Has_Same_Storage and
'Overlaps_Storage.
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference): Remove useless
skipping for attribute Input.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_attr.adb | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 1ef30656496..25f16276c5e 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -2002,8 +2002,8 @@ package body Exp_Attr is
--
-- Skip check for output parameters of an Asm instruction (since their
-- valuesare not set till after the attribute has been elaborated),
- -- for the arguments of a 'Read or 'Input attribute reference (since
- -- the scalar argument is an OUT scalar) and for the arguments of a
+ -- for the arguments of a 'Read attribute reference (since the
+ -- scalar argument is an OUT scalar) and for the arguments of a
-- 'Has_Same_Storage or 'Overlaps_Storage attribute reference (which not
-- considered to be reads of their prefixes and expressions, see Ada RM
-- 13.3(73.10/3)).
@@ -2011,7 +2011,6 @@ package body Exp_Attr is
if Validity_Checks_On and then Validity_Check_Operands
and then Id /= Attribute_Asm_Output
and then Id /= Attribute_Read
- and then Id /= Attribute_Input
and then Id /= Attribute_Has_Same_Storage
and then Id /= Attribute_Overlaps_Storage
then
--
2.34.1
reply other threads:[~2022-11-07 8:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221107083828.150145-1-poulhies@adacore.com \
--to=poulhies@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=trojanek@adacore.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).