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 r13-4197] ada: Minor tweak in assertion
Date: Mon, 21 Nov 2022 10:13:28 +0000 (GMT)	[thread overview]
Message-ID: <20221121101328.B2D673857C51@sourceware.org> (raw)

https://gcc.gnu.org/g:5947b1ee8af0c8e5a08a20f1f2b9f0b09720d130

commit r13-4197-g5947b1ee8af0c8e5a08a20f1f2b9f0b09720d130
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Thu Nov 17 13:31:33 2022 +0100

    ada: Minor tweak in assertion
    
    For an array subtype, being definite is the same as being constrained.
    
    gcc/ada/
    
            * sem_util.adb (Needs_Secondary_Stack): Test Is_Constrained
            directly instead of Is_Definite_Subtype for an array subtype.

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

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 67baf7abfad..f331b4b78ba 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -23634,7 +23634,7 @@ package body Sem_Util is
       --  Unconstrained array type
 
       else
-         pragma Assert (Is_Array_Type (Typ) and not Is_Definite_Subtype (Typ));
+         pragma Assert (Is_Array_Type (Typ) and then not Is_Constrained (Typ));
          return True;
       end if;
    end Needs_Secondary_Stack;

                 reply	other threads:[~2022-11-21 10:13 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=20221121101328.B2D673857C51@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).