[Ada] Small cleanup in handling of Ada 2012 implicit dereferences
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 21 Mar 2020 12:25:45 +0000 (13:25 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 12 Jun 2020 08:29:13 +0000 (04:29 -0400)
commit4459999864a87462a7dc4a877238eb2cac0d1b3e
tree2e3c3687a38d00fe1bed4ceb2cc1f05253f1d1b9
parentc14b424ec73738165d0031888b534562a7ce6438
[Ada] Small cleanup in handling of Ada 2012 implicit dereferences

2020-06-12  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch4.adb (Try_Container_Indexing): Replace call to
First_Discriminant by Get_Reference_Discriminant to get the
reference discriminant.
* sem_ch13.adb (Check_Indexing_Functions): Likewise.
* sem_ch5.adb (Preanalyze_Range): Call Get_Reference_Discriminant
to get the reference discriminant.
* sem_util.adb (Is_OK_Variable_For_Out_Formal): Treat all
Ada 2012 implicit dereferences in only one place.
(Is_Variable): Minor tweak.
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch5.adb
gcc/ada/sem_util.adb