summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-04 10:03:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-04 10:03:34 +0000
commit7cfe183ab9afc767973c64da9923754c68f1287f (patch)
tree7e114335e52346e0606bbed08edca8aaef5be224 /gcc/ada/sem_prag.ads
parentcad06491bbd09fe5c58e00ebfd9fb5d3f4e75502 (diff)
downloadgcc-7cfe183ab9afc767973c64da9923754c68f1287f.tar.gz
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Check_Inherited_Conditions): Perform two passes over the primitive operations of the type: one over source overridings to build the primitives mapping, and one over inherited operations to check for the need to create wrappers, and to check legality of inherited condition in SPARK. * sem_prag.ads (Update_Primitive_Mapping): Make public, for use in freeze actions. * sem_prag.adb (Build_Pragma_Check_Equivalent): Refine error message in the case of an inherited condition in SPARK that includes a call to some other overriding primitive. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.ads')
-rw-r--r--gcc/ada/sem_prag.ads11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads
index 064534f6ee3..8613bba1831 100644
--- a/gcc/ada/sem_prag.ads
+++ b/gcc/ada/sem_prag.ads
@@ -528,4 +528,15 @@ package Sem_Prag is
--
-- Empty if there is no such argument
+ procedure Update_Primitives_Mapping
+ (Inher_Id : Entity_Id;
+ Subp_Id : Entity_Id);
+
+ -- map primitive operations of the parent type to the corresponding
+ -- operations of the descendant. note that the descendant type may
+ -- not be frozen yet, so we cannot use the dispatch table directly.
+ -- This is called when elaborating a contract for a subprogram, and
+ -- when freezing a type extension to verify legality rules on inherited
+ -- conditions.
+
end Sem_Prag;