From: Piotr Trojanek Date: Tue, 27 Jul 2021 13:00:39 +0000 (+0200) Subject: [Ada] Tune detection of internally generated positional aggregates X-Git-Tag: basepoints/gcc-13~4460 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d1b4a7e0328f8482145c5b3d6333b27e38a919;p=thirdparty%2Fgcc.git [Ada] Tune detection of internally generated positional aggregates gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Only keep the bounds for internally generated attributes; otherwise, compute them anew. --- diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 732f0f39a48f..c4c4d9152dcd 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2800,7 +2800,10 @@ package body Sem_Aggr is -- Exp_Aggr.Convert_To_Positional, so we don't want to change those -- bounds. - if Present (Aggregate_Bounds (N)) and then not Others_Allowed then + if Present (Aggregate_Bounds (N)) + and then not Others_Allowed + and then not Comes_From_Source (N) + then Aggr_Low := Low_Bound (Aggregate_Bounds (N)); Aggr_High := High_Bound (Aggregate_Bounds (N)); end if;