From c37c13e15e2a8e9f2716c29fe89cc2300d4457ce Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Fri, 19 Mar 2021 16:01:40 -0400 Subject: [Ada] Ada2020: AI12-0195 overriding class-wide pre/post conditions gcc/ada/ * contracts.adb (Process_Spec_Postconditions): Add missing support for aliased subprograms and handle wrappers of class-wide pre/post conditions. (Process_Inherited_Preconditions): Add missing support for aliased subprograms and handle wrappers of class-wide pre/post conditions. * einfo.ads (Class_Wide_Clone): Fix typo. (Is_Class_Wide_Clone): Removed since it is not referenced. (Is_Wrapper): Documenting new flag. (LSP_Subprogram): Documenting new attribute. * exp_ch3.adb (Make_Controlling_Function_Wrappers): Decorate wrapper as Is_Wrapper and adjust call to Override_Dispatching_Operation. * freeze.adb (Build_Inherited_Condition_Pragmas): Fix typo in documentation. (Check_Inherited_Conditions): Handle LSP wrappers; ensure correct decoration of LSP wrappers. * gen_il-fields.ads (Is_Class_Wide_Clone): Removed. (Is_Wrapper): Added. (LSP_Subprogram): Added. * gen_il-gen-gen_entities.adb (Is_Class_Wide_Clone): Removed. (Is_Wrapper): Added. (LSP_Subprogram): Added. * gen_il-internals.adb (Image): Adding uppercase image of LSP_Subprogram. * sem_ch6.adb (New_Overloaded_Entity): Fix decoration of LSP wrappers. * sem_disp.ads (Override_Dispatching_Operation): Remove parameter Is_Wrapper; no longer needed. * sem_disp.adb (Check_Dispatching_Operation): Adjust assertion. (Override_Dispatching_Operation): Remove parameter Is_Wrapper; no longer needed. * treepr.adb (Image): Adding uppercase image of LSP_Subprogram. --- gcc/ada/treepr.adb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/treepr.adb') diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb index d869ea7..519242e 100644 --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -371,6 +371,8 @@ package body Treepr is return "Is_Elaboration_Warnings_OK_Id"; when F_Is_RACW_Stub_Type => return "Is_RACW_Stub_Type"; + when F_LSP_Subprogram => + return "LSP_Subprogram"; when F_OK_To_Rename => return "OK_To_Rename"; when F_Referenced_As_LHS => -- cgit v1.1