aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 09:56:05 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 09:56:05 +0200
commitb912db16175b8e78c6311e26753e6e2f474063f1 (patch)
tree3a79b81ad795953c9a971e517072177b9de216ed /gcc/ada/sinfo.adb
parente57136da2fe3d4a82ad5c88f96cebebf2a007caa (diff)
downloadgcc-b912db16175b8e78c6311e26753e6e2f474063f1.zip
gcc-b912db16175b8e78c6311e26753e6e2f474063f1.tar.gz
gcc-b912db16175b8e78c6311e26753e6e2f474063f1.tar.bz2
[multiple changes]
2017-04-25 Arnaud Charlet <charlet@adacore.com> * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced loading of an entity. * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern previously repeated in the analysis. * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration): use new procedure SPARK_Implicit_Load. * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure SPARK_Implicit_Load. 2017-04-25 Javier Miranda <miranda@adacore.com> * sem_util.adb (New_Copy_Tree): By default copying of defining identifiers is prohibited because this would introduce an entirely new entity into the tree. This patch introduces an exception to this general rule: the declaration of constants and variables located in Expression_With_Action nodes. (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement. (In_Map): New subprogram. (Visit_Entity): New subprogram. (Visit_Node): Handle EWA_Level, EWA_Inner_Scope_Level, and take care of defining entities defined in Expression_With_Action nodes. 2017-04-25 Thomas Quinot <quinot@adacore.com> * exp_ch6.adb: minor comment edit. * sinfo.ads, sinfo.adb: New Null_Statement attribute for null procedure specifications that come from source. * par-ch6.adb (P_Subprogram, case of a null procedure): Set new Null_Statement attribute. * par_sco.adb (Traverse_Declarations_Or_Statements): For a null procedure, generate statement SCO for the generated NULL statement. * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from parser, if available. From-SVN: r247136
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb56
1 files changed, 36 insertions, 20 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index fc88da8..400ac42 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -2472,16 +2472,6 @@ package body Sinfo is
return Flag18 (N);
end Non_Aliased_Prefix;
- function Null_Present
- (N : Node_Id) return Boolean is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Component_List
- or else NT (N).Nkind = N_Procedure_Specification
- or else NT (N).Nkind = N_Record_Definition);
- return Flag13 (N);
- end Null_Present;
-
function Null_Excluding_Subtype
(N : Node_Id) return Boolean is
begin
@@ -2519,6 +2509,16 @@ package body Sinfo is
return Flag14 (N);
end Null_Exclusion_In_Return_Present;
+ function Null_Present
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Component_List
+ or else NT (N).Nkind = N_Procedure_Specification
+ or else NT (N).Nkind = N_Record_Definition);
+ return Flag13 (N);
+ end Null_Present;
+
function Null_Record_Present
(N : Node_Id) return Boolean is
begin
@@ -2528,6 +2528,14 @@ package body Sinfo is
return Flag17 (N);
end Null_Record_Present;
+ function Null_Statement
+ (N : Node_Id) return Node_Id is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Procedure_Specification);
+ return Node2 (N);
+ end Null_Statement;
+
function Object_Definition
(N : Node_Id) return Node_Id is
begin
@@ -5774,16 +5782,6 @@ package body Sinfo is
Set_Flag18 (N, Val);
end Set_Non_Aliased_Prefix;
- procedure Set_Null_Present
- (N : Node_Id; Val : Boolean := True) is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Component_List
- or else NT (N).Nkind = N_Procedure_Specification
- or else NT (N).Nkind = N_Record_Definition);
- Set_Flag13 (N, Val);
- end Set_Null_Present;
-
procedure Set_Null_Excluding_Subtype
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5821,6 +5819,16 @@ package body Sinfo is
Set_Flag14 (N, Val);
end Set_Null_Exclusion_In_Return_Present;
+ procedure Set_Null_Present
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Component_List
+ or else NT (N).Nkind = N_Procedure_Specification
+ or else NT (N).Nkind = N_Record_Definition);
+ Set_Flag13 (N, Val);
+ end Set_Null_Present;
+
procedure Set_Null_Record_Present
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5830,6 +5838,14 @@ package body Sinfo is
Set_Flag17 (N, Val);
end Set_Null_Record_Present;
+ procedure Set_Null_Statement
+ (N : Node_Id; Val : Node_Id) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Procedure_Specification);
+ Set_Node2 (N, Val);
+ end Set_Null_Statement;
+
procedure Set_Object_Definition
(N : Node_Id; Val : Node_Id) is
begin