From: Viljar Indus Date: Tue, 6 Jun 2023 11:55:04 +0000 (+0300) Subject: ada: Fix expanding container aggregates X-Git-Tag: basepoints/gcc-15~8017 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=765fc22ca5dbba94198e555ebcebb1944cf24731;p=thirdparty%2Fgcc.git 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 --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 5e22fefbc1de..d922c3bf1a44 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);