[Ada] Wrappers of access-to-subprograms with pre/post conditions
authorJavier Miranda <miranda@adacore.com>
Mon, 26 Jul 2021 08:55:39 +0000 (04:55 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 23 Sep 2021 13:06:15 +0000 (13:06 +0000)
commitabf3f4f3096dcc95614fdd5c9f6a2351eaaae9df
treee9331983a88ed9520b438cf1f5f8404655ed199f
parentfe43084ca31636ee5c997cc9c37f88e71a59293c
[Ada] Wrappers of access-to-subprograms with pre/post conditions

gcc/ada/

* sem_ch3.adb (Build_Access_Subprogram_Wrapper): Decorate the
wrapper with attribute Is_Wrapper, and move its declaration to
the freezing actions of its type declaration; done to facilitate
identifying it at later stages to avoid handling it as a
primitive operation of a tagged type; otherwise it may be
handled as a dispatching operation and erroneously registered in
a dispatch table.
(Make_Index): Add missing decoration of field Parent.
* sem_disp.adb (Check_Dispatching_Operation): Complete
decoration of late-overriding dispatching primitives.
(Is_Access_To_Subprogram_Wrapper): New subprogram.
(Inherited_Subprograms): Prevent cascaded errors; adding missing
support for private types.
* sem_type.adb (Add_One_Interp): Add missing support for the
first interpretation of a primitive of an inmediate ancestor
interface.
* sem_util.adb (Check_Result_And_Post_State_In_Pragma): Do not
report missing reference in postcondition placed in internally
built wrappers.
* exp_disp.adb (Expand_Dispatching_Call): Adding assertion.
gcc/ada/exp_disp.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_disp.adb
gcc/ada/sem_type.adb
gcc/ada/sem_util.adb