aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_disp.adb
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2015-03-02 11:11:01 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-03-02 12:11:01 +0100
commit024d33d837c172088236be33fd52b7a6ac8e4e9d (patch)
treeb4a9f096a4089af6ac6688f769059f5ac21a541f /gcc/ada/sem_disp.adb
parent7c76aa3f9f6a59ad56dcf3bce8197f4ac53242dc (diff)
downloadgcc-024d33d837c172088236be33fd52b7a6ac8e4e9d.zip
gcc-024d33d837c172088236be33fd52b7a6ac8e4e9d.tar.gz
gcc-024d33d837c172088236be33fd52b7a6ac8e4e9d.tar.bz2
exp_ch9.adb (Build_Corresponding_Record): Propagate type invariants to the corresponding record type.
2015-03-02 Javier Miranda <miranda@adacore.com> * exp_ch9.adb (Build_Corresponding_Record): Propagate type invariants to the corresponding record type. * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram which sets the value of the DTC_Entity associated with a given primitive of a tagged type and propagates the value to the wrapped subprogram. (Set_DTC_Entity_Value): Propagate the DTC value to the wrapped entity. * sem_ch13.adb (Build_Invariant_Procedure): Append the code associated with invariants of progenitors. * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants of parents and progenitors. (Process_Full_View): Check hidden inheritance of class-wide type invariants. * sem_ch7.adb (Analyze_Package_Specification): Do not generate the invariant procedure for interface types; build the invariant procedure for tagged types inheriting invariants from their progenitors. * sem_prag.adb (Pragma_Invariant) Allow invariants in interface types but do not build their invariant procedure since their invariants will be propagated to the invariant procedure of types covering the interface. * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position by calls to Set_DT_Position_Value. From-SVN: r221113
Diffstat (limited to 'gcc/ada/sem_disp.adb')
-rw-r--r--gcc/ada/sem_disp.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index b49913d..bc36c27 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -1122,7 +1122,7 @@ package body Sem_Disp is
if Present (DTC_Entity (Old_Subp)) then
Set_DTC_Entity (Subp, DTC_Entity (Old_Subp));
- Set_DT_Position (Subp, DT_Position (Old_Subp));
+ Set_DT_Position_Value (Subp, DT_Position (Old_Subp));
if not Restriction_Active (No_Dispatching_Calls) then
if Building_Static_DT (Tagged_Type) then
@@ -1419,7 +1419,7 @@ package body Sem_Disp is
end if;
if not Body_Is_Last_Primitive then
- Set_DT_Position (Subp, No_Uint);
+ Set_DT_Position_Value (Subp, No_Uint);
elsif Has_Controlled_Component (Tagged_Type)
and then Nam_In (Chars (Subp), Name_Initialize,
@@ -1678,7 +1678,7 @@ package body Sem_Disp is
Check_Controlling_Formals (Tagged_Type, Old_Subp);
Set_Is_Dispatching_Operation (Old_Subp, True);
- Set_DT_Position (Old_Subp, No_Uint);
+ Set_DT_Position_Value (Old_Subp, No_Uint);
end if;
-- If the old subprogram is an explicit renaming of some other