public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2151] [Ada] Skip types in error for test to compute array size
@ 2021-07-08 13:36 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-08 13:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7

commit r12-2151-g6cb2bcba3f31c6ec93fe76ff5e0f67db43556ef7
Author: Yannick Moy <moy@adacore.com>
Date:   Wed May 26 14:54:02 2021 +0200

    [Ada] Skip types in error for test to compute array size
    
    gcc/ada/
    
            * layout.adb (Layout_Type): Do not call Number_Dimensions if the
            type does not have First_Index set.

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

diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index ee8e281785e..de731932d32 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -498,6 +498,7 @@ package body Layout is
          --  in GNAT, i.e. when Packed_Array_Impl_Type is set.
 
          if Is_Array_Type (E)
+           and then Present (First_Index (E))  --  Skip types in error
            and then Number_Dimensions (E) = 1
            and then not Present (Packed_Array_Impl_Type (E))
            and then Has_Pragma_Pack (E)


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

only message in thread, other threads:[~2021-07-08 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 13:36 [gcc r12-2151] [Ada] Skip types in error for test to compute array size Pierre-Marie de Rodat

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