From: Piotr Trojanek <troja...@adacore.com> When inlining subprogram calls in GNATprove mode, the actual parameter is wrapped in an unchecked conversion. If this actual parameter is an aggregate OTHERS clause, then the type of unchecked conversion allows us to resolve this clause (just like for aggregates wrapped in a qualified expression).
Previously such aggregates were rejected, which caused spurious and cryptic errors; now they are accepted. gcc/ada/ * sem_aggr.adb (Resolve_Aggregate): Accept aggregates with OTHERS appearing inside unchecked conversions. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aggr.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 3ebb30d64ed..2ccfe6dcaef 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -1180,6 +1180,7 @@ package body Sem_Aggr is | N_Component_Declaration | N_Parameter_Specification | N_Qualified_Expression + | N_Unchecked_Type_Conversion | N_Reference | N_Aggregate | N_Extension_Aggregate -- 2.40.0