public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4197] ada: Minor tweak in assertion
@ 2022-11-21 10:13 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2022-11-21 10:13 UTC (permalink / raw)
  To: gcc-cvs

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-21 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 10:13 [gcc r13-4197] ada: Minor tweak in assertion Marc Poulhi?s

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).