public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2122] ada: Fix expanding container aggregates
@ 2023-06-27 12:07 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-06-27 12:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:765fc22ca5dbba94198e555ebcebb1944cf24731

commit r14-2122-g765fc22ca5dbba94198e555ebcebb1944cf24731
Author: Viljar Indus <indus@adacore.com>
Date:   Tue Jun 6 14:55:04 2023 +0300

    ada: Fix expanding container aggregates
    
    Ensure that that container aggregate expressions are expanded as
    such and not as records even if the type of the expression is a
    record.
    
    gcc/ada/
    
            * exp_aggr.adb (Expand_N_Aggregate): Ensure that container
            aggregate expressions do not get expanded as records but instead
            as container aggregates.

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

diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 5e22fefbc1d..d922c3bf1a4 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -6463,6 +6463,7 @@ package body Exp_Aggr is
 
       if Is_Record_Type (T)
         and then not Is_Private_Type (T)
+        and then not Is_Homogeneous_Aggregate (N)
       then
          Expand_Record_Aggregate (N);

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

only message in thread, other threads:[~2023-06-27 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 12:07 [gcc r14-2122] ada: Fix expanding container aggregates 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).