[Ada] Tighten up semantic checking for protected subprogram declarations
authorSteve Baird <baird@adacore.com>
Thu, 12 Dec 2019 10:03:43 +0000 (10:03 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 12 Dec 2019 10:03:43 +0000 (10:03 +0000)
commit97b2ffb81fdef1f0c2dc3ec337a9d9a61f3b98fc
tree8cb96956fab8552d2c8f818becd4a78fc56d7484
parent93350089be1a068328192eb1a89f232099d0f0c7
[Ada] Tighten up semantic checking for protected subprogram declarations

2019-12-12  Steve Baird  <baird@adacore.com>

gcc/ada/

* sem_ch6.adb
(New_Overloaded_Entity.Check_Conforming_Paramters): Add new
Conformance_Type parameter. With the value of
Subtype_Conformant, the behavior of Check_Conforming_Parameters
is unchanged.  The call in Matching_Entry_Or_Subprogram to
instead passes in Type_Conformant. This corresponds to the use
of "type conformant" in Ada RM 9.4(11.4/3).
(New_Overloaded_Entity.Has_Matching_Entry_Or_Subprogram): Add
new Normalized_First_Parameter_Type function to help in ignoring
the distinction between protected and access-to-protected first
parameters when checking prefixed-view profile matching. Replace
computations of the type of the first parameter with calls to
this function as appropriate.

From-SVN: r279303
gcc/ada/ChangeLog
gcc/ada/sem_ch6.adb