public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Giuliano Belinassi <giulianob@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/autopar_devel] [Ada] Ada2020: AI12-0198 potentially unevaluated components of arrays
Date: Sat, 22 Aug 2020 23:21:58 +0000 (GMT)	[thread overview]
Message-ID: <20200822232158.5535D393C85A@sourceware.org> (raw)

https://gcc.gnu.org/g:af0f28029dd68c9a2c6dcaf774fb2f3943285270

commit af0f28029dd68c9a2c6dcaf774fb2f3943285270
Author: Javier Miranda <miranda@adacore.com>
Date:   Wed May 13 06:24:59 2020 -0400

    [Ada] Ada2020: AI12-0198 potentially unevaluated components of arrays
    
    gcc/ada/
    
            * sem_util.adb (Is_Potentially_Unevaluated): Code cleanup.

Diff:
---
 gcc/ada/sem_util.adb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 44ed3e61dac..2c9e274478e 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -17806,7 +17806,6 @@ package body Sem_Util is
                                N_Or_Else,
                                N_Quantified_Expression)
         and then not (Nkind (Par) = N_Aggregate
-                        and then Present (Etype (Par))
                         and then Etype (Par) /= Any_Composite
                         and then Is_Array_Type (Etype (Par)))
       loop
@@ -17854,6 +17853,7 @@ package body Sem_Util is
          return Expr = Condition (Par);
 
       elsif Nkind (Par) = N_Aggregate
+        and then Etype (Par) /= Any_Composite
         and then Is_Array_Type (Etype (Par))
         and then Nkind (Expr) = N_Component_Association
       then
@@ -17874,7 +17874,6 @@ package body Sem_Util is
                   return True;
 
                elsif Nkind (Choice) = N_Identifier
-                 and then Present (Etype (Choice))
                  and then Present (Scalar_Range (Etype (Choice)))
                  and then
                    Non_Static_Or_Null_Range (Scalar_Range (Etype (Choice)))


             reply	other threads:[~2020-08-22 23:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-22 23:21 Giuliano Belinassi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-22 23:21 Giuliano Belinassi
2020-08-22 23:20 Giuliano Belinassi

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=20200822232158.5535D393C85A@sourceware.org \
    --to=giulianob@gcc.gnu.org \
    --cc=gcc-cvs@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).