aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-05-02 12:18:12 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-05-02 12:18:12 +0200
commit42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8 (patch)
treedbb33c2ad4d55daac28792110fc46b320436430c /gcc/ada/einfo.adb
parent331e50151c7fbc9931899d0c10fa5fed7be4f8be (diff)
downloadgcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.zip
gcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.tar.gz
gcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.tar.bz2
[multiple changes]
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_prag.adb, comperr.adb: Minor reformatting. 2016-05-02 Ed Schonberg <schonberg@adacore.com> * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an unchecked conversion if the source size is 0 (indicating that its RM size is unknown). This will happen with packed arrays of non-discrete types, in which case the component type is known to match. 2016-05-02 Arnaud Charlet <charlet@adacore.com> * debug.adb: Reserve -gnatd.V. 2016-05-02 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Process_Full_View): Remove from visibility wrappers of synchronized types to avoid spurious errors with their wrapped entity. * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper if no interface primitive is covered by the subprogram and this is not a primitive declared between two views; see Process_Full_View. (Build_Protected_Sub_Specification): Link the dispatching subprogram with its original non-dispatching protected subprogram since their names differ. (Expand_N_Protected_Type_Declaration): If a protected subprogram overrides an interface primitive then do not build a wrapper if it was already built. * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute. * sem_ch4.adb (Names_Match): New subprogram. * sem_ch6.adb (Check_Synchronized_Overriding): Moved to library level and defined in the public part of the package to invoke it from Exp_Ch9.Build_Wrapper_Spec (Has_Matching_Entry_Or_Subprogram): New subprogram. (Report_Conflict): New subprogram. From-SVN: r235739
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 378b757..e66ca79 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -274,6 +274,7 @@ package body Einfo is
-- SPARK_Pragma Node40
+ -- Original_Protected_Subprogram Node41
-- SPARK_Aux_Pragma Node41
---------------------------------------------
@@ -2837,6 +2838,11 @@ package body Einfo is
return Node21 (Id);
end Original_Array_Type;
+ function Original_Protected_Subprogram (Id : E) return N is
+ begin
+ return Node41 (Id);
+ end Original_Protected_Subprogram;
+
function Original_Record_Component (Id : E) return E is
begin
pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
@@ -5900,6 +5906,12 @@ package body Einfo is
Set_Node21 (Id, V);
end Set_Original_Array_Type;
+ procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
+ begin
+ pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
+ Set_Node41 (Id, V);
+ end Set_Original_Protected_Subprogram;
+
procedure Set_Original_Record_Component (Id : E; V : E) is
begin
pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
@@ -10483,6 +10495,10 @@ package body Einfo is
E_Task_Type =>
Write_Str ("SPARK_Aux_Pragma");
+ when E_Function |
+ E_Procedure =>
+ Write_Str ("Original_Protected_Subprogram");
+
when others =>
Write_Str ("Field41??");
end case;