public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-1975] ada: Fix for attribute Range in Exceptional_Cases
Date: Tue, 20 Jun 2023 07:47:02 +0000 (GMT)	[thread overview]
Message-ID: <20230620074702.805883857725@sourceware.org> (raw)

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

commit r14-1975-gb367a66cfb620b88338111eebd549cc2fad1c16b
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Jun 5 10:30:39 2023 +0200

    ada: Fix for attribute Range in Exceptional_Cases
    
    Attribute Range is now handled like First and Last when occurring within
    the consequence of Exceptional_Cases, i.e. attribute Range is not
    considered to be a read of a formal parameter that would not be allowed
    in the contract.
    
    gcc/ada/
    
            * sem_res.adb (Resolve_Entity_Name): Handle Range like First and Last.

Diff:
---
 gcc/ada/sem_res.adb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 6867c8f1275..ef3b877f5db 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -8124,7 +8124,8 @@ package body Sem_Res is
                             Attribute_Name (Parent (N)) in Name_Constrained
                                                          | Name_First
                                                          | Name_Last
-                                                         | Name_Length)
+                                                         | Name_Length
+                                                         | Name_Range)
               and then not Is_By_Reference_Type (Etype (E))
               and then not Is_Aliased (E)
             then

                 reply	other threads:[~2023-06-20  7:47 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=20230620074702.805883857725@sourceware.org \
    --to=dkm@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).