aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-10-24 17:09:39 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-12-13 09:36:00 +0100
commit9c0382624b302be3fda8a465dd37615344f7bef6 (patch)
tree6195353a8437cb6118facc131abc23167f7fe8e8 /gcc/value-range.cc
parent83b250bf58f681aff7a6856579cfd89e759b2a93 (diff)
downloadgcc-9c0382624b302be3fda8a465dd37615344f7bef6.zip
gcc-9c0382624b302be3fda8a465dd37615344f7bef6.tar.gz
gcc-9c0382624b302be3fda8a465dd37615344f7bef6.tar.bz2
ada: Further work in semantic analysis of iterated component associations
This finishes up the transition to preanalysis of a copy of the expression for iterated component associations in all contexts, thus voiding the need to clean things up afterward. However, this requires a larger cleanup in semantics analysis of aggregates, in particular for others choices, which are currently skipped in Sem_Aggr, with Exp_Aggr trying to patch things up afterward but leaving some legality loopholes in the end. That's why this makes sure that all the expressions appearing in aggregates are either analyzed or preanalyzed by Sem_Aggr, as documented in the spec of Sem, modulo the copy in an iteration context. gcc/ada/ChangeLog: * exp_aggr.adb (Build_Array_Aggr_Code): Remove obsolete comment. (Convert_To_Positional): Remove Ctyp local variable. (Is_Static_Element): Remove Dims parameter and do not preanalyze the expression there. (Expand_Array_Aggregate): Make Ctyp a constant. (Compute_Others_Present): Do not preanalyze the expression there. * sem_aggr.adb (Resolve_Array_Aggregate): New Ctyp constant. Use it throughout the procedure to denote the component type. (Resolve_Aggr_Expr): Always preanalyze a copy of the expression in an iteration context. Preanalyze it directly when the expander is active and the choice may cover multiple components. Otherwise, fully analyze it. Do not reanalyze an iterated component association with an others choice either when there are positional components. (Resolve_Iterated_Component_Association): Do not remove references from the expression after invoking Resolve_Aggr_Expr on it.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions