aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2022-05-02 14:11:03 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2022-06-01 08:43:17 +0000
commit3c2674cc0d725783a501a78cdc1256642448c159 (patch)
treea2d0bb030119223ba9049c9e0f581efba0648235 /gcc/value-range.h
parentc97f3a7dc230dab0877d0c27b84eb06132cf7bf8 (diff)
downloadgcc-3c2674cc0d725783a501a78cdc1256642448c159.zip
gcc-3c2674cc0d725783a501a78cdc1256642448c159.tar.gz
gcc-3c2674cc0d725783a501a78cdc1256642448c159.tar.bz2
[Ada] Fix search for "for ... of" loop subprograms
This patch makes the search for Get_Element_Access, Step (Next/Prev), Reference_Control_Type, and Pseudo_Reference (for optimized "for ... of" loops) more robust. In particular, we have a new Next procedure in Ada 2022, and we need to pick the right one. We have not yet added the new Next and other subprograms. gcc/ada/ * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For each subprogram found, assert that the variable is Empty, so we can detect bugs where we find two or more things with the same name. Without this patch, that bug would happen when we add the new Next procedure. For Step, make sure we pick the right one, by checking name and number of parameters. For Get_Element_Access, check that we're picking a function. That's not really necessary, because there is no procedure with that name, but it seems cleaner this way. * rtsfind.ads: Minor comment improvement. It seems kind of odd to say "under no circumstances", and then immediately contradict that with "The one exception is...".
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions