diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-07-27 15:00:39 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-23 13:06:16 +0000 |
commit | f7d1b4a7e0328f8482145c5b3d6333b27e38a919 (patch) | |
tree | 669ce6669d308f34a66531621c3385555e2caee8 /gcc | |
parent | abf3f4f3096dcc95614fdd5c9f6a2351eaaae9df (diff) | |
download | gcc-f7d1b4a7e0328f8482145c5b3d6333b27e38a919.zip gcc-f7d1b4a7e0328f8482145c5b3d6333b27e38a919.tar.gz gcc-f7d1b4a7e0328f8482145c5b3d6333b27e38a919.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 732f0f3..c4c4d91 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; |