aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-31 15:27:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-31 15:27:23 +0200
commitfce547639dcebba692c4c864287cb371360a6661 (patch)
tree7c587eb438e9a664240705f87f8dde3890f47eb1 /gcc/ada/einfo.adb
parent7f3d273a22571f6dd578c079dbdba9340790c8c2 (diff)
downloadgcc-fce547639dcebba692c4c864287cb371360a6661.zip
gcc-fce547639dcebba692c4c864287cb371360a6661.tar.gz
gcc-fce547639dcebba692c4c864287cb371360a6661.tar.bz2
[multiple changes]
2014-07-31 Arnaud Charlet <charlet@adacore.com> * lib-writ.adb (Write_Unit_Information): Fix case where U = No_Unit. 2014-07-31 Claire Dross <dross@adacore.com> * exp_util.adb, exp_util.ads (Get_First_Parent_With_External_Axiomatization_For_Entity): New routine to find the first parent of an entity with a pragma Annotate (GNATprove, External_Axiomatization). (Has_Annotate_Pragma_For_External_Axiomatization): New function to check if a package has a pragma Annotate (GNATprove, External_Axiomatization). * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New flag on the entity for the declaration created for a formal subprogram in an instance. This is a renaming declaration, or in GNATprove_Mode the declaration of an expression function that captures the axiomatization of the actual. * sem_ch6.adb (Analyze_Expression_Function): For a Generic_Actual_Subprogram, place body immediately after the declaration because it may be used in a subsequent declaration in the instance. * sem_ch12.adb (Build_Wrapper): Add code to handle instances where the actual is a function, not an operator. Handle functions with one and two parameters and binary and unary operators. 2014-07-31 Pascal Obry <obry@adacore.com> * cstreams.c (__gnat_is_regular_file_fd): Removed. * adaint.c (__gnat_is_regular_file_fd): Added. From-SVN: r213364
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 95d94ec..d4929c3 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -569,10 +569,11 @@ package body Einfo is
-- (SSO_Set_Low_By_Default) Flag272
-- (SSO_Set_Low_By_Default) Flag273
+ -- Is_Generic_Actual_Subprogram Flag274
+
-- (unused) Flag2
-- (unused) Flag3
- -- (unused) Flag274
-- (unused) Flag275
-- (unused) Flag276
-- (unused) Flag277
@@ -2053,6 +2054,12 @@ package body Einfo is
return Flag4 (Id);
end Is_Frozen;
+ function Is_Generic_Actual_Subprogram (Id : E) return B is
+ begin
+ pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ return Flag274 (Id);
+ end Is_Generic_Actual_Subprogram;
+
function Is_Generic_Actual_Type (Id : E) return B is
begin
pragma Assert (Is_Type (Id));
@@ -4840,6 +4847,12 @@ package body Einfo is
Set_Flag4 (Id, V);
end Set_Is_Frozen;
+ procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
+ begin
+ pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ Set_Flag274 (Id, V);
+ end Set_Is_Generic_Actual_Subprogram;
+
procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
begin
pragma Assert (Is_Type (Id));
@@ -8391,6 +8404,7 @@ package body Einfo is
W ("Is_For_Access_Subtype", Flag118 (Id));
W ("Is_Formal_Subprogram", Flag111 (Id));
W ("Is_Frozen", Flag4 (Id));
+ W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
W ("Is_Generic_Actual_Type", Flag94 (Id));
W ("Is_Generic_Instance", Flag130 (Id));
W ("Is_Generic_Type", Flag13 (Id));