From: Viljar Indus <in...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- 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); -- 2.40.0