]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix handling of iterated component associations with sub-aggregates
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 16 Jul 2024 14:07:59 +0000 (16:07 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 2 Aug 2024 07:08:10 +0000 (09:08 +0200)
commitd8a27bb9a7d932b3a3f8b1ffc9e156f698d08aee
tree018e87d7d72cdd9f54f5f411f62f006da42a851a
parent637b27b98076d8857aa62655bbb815a39f8f68bc
ada: Fix handling of iterated component associations with sub-aggregates

Fix a number of problems in handling of actions generated for a
2-dimensional array aggregate where the outer aggregate has iterated
component association and the inner aggregate involves run-time checks.

gcc/ada/

* exp_aggr.adb (Add_Loop_Actions): Actions are now attached to
iterated component association just like they are attached to
ordinary component association.
(Build_Array_Aggr_Code): If resolution of the array aggregate
generated some actions, e.g. for run-time checks, then we must
keep them; same for the Other_Clause.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Unset
references to iterator variable in loop actions (which might come
from run-time check), just these references are unset in the
expression itself.
gcc/ada/exp_aggr.adb
gcc/ada/sem_aggr.adb