[Ada] Better code generation for nested aggregates
authorJavier Miranda <miranda@adacore.com>
Mon, 10 Feb 2020 22:12:32 +0000 (17:12 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 8 Jun 2020 07:50:58 +0000 (03:50 -0400)
2020-06-08  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_aggr.adb (Safe_Component): Remove code that considers as
unsafe components that are aggregates; such removal allows the
frontend to proceed and evaluate if they are safe by means of
invoking Safe_Aggregate.

gcc/ada/exp_aggr.adb

index 26765e9f4387bf665013fb153d20375ac50135cf..aad902269db88391e49799d49be745116199b43c 100644 (file)
@@ -4283,11 +4283,6 @@ package body Exp_Aggr is
             if Is_Overloaded (Expr) then
                return False;
 
-            elsif Nkind (Expr) = N_Aggregate
-               and then not Is_Others_Aggregate (Expr)
-            then
-               return False;
-
             elsif Nkind (Expr) = N_Allocator then
 
                --  For now, too complex to analyze