diff options
author | Ed Schonberg <schonberg@adacore.com> | 2016-07-04 10:03:34 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-04 12:03:34 +0200 |
commit | 002e3d16cbf86f160bc6467983ca515471c4156d (patch) | |
tree | 7e114335e52346e0606bbed08edca8aaef5be224 /gcc/ada/sem_prag.ads | |
parent | 10edebe7b49ee1903bca94e03d4cf9c8194c3905 (diff) | |
download | gcc-002e3d16cbf86f160bc6467983ca515471c4156d.zip gcc-002e3d16cbf86f160bc6467983ca515471c4156d.tar.gz gcc-002e3d16cbf86f160bc6467983ca515471c4156d.tar.bz2 |
freeze.adb (Check_Inherited_Conditions): Perform two passes over the primitive operations of the type...
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.
From-SVN: r237960
Diffstat (limited to 'gcc/ada/sem_prag.ads')
-rw-r--r-- | gcc/ada/sem_prag.ads | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 064534f..8613bba 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; |