aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:02:11 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:02:11 +0100
commit6413509bd47c3d3c2c9160d5d13a5d4f40903456 (patch)
tree378c5cf31d3b8756ae2a4d5c713c5cf54a338534 /gcc/ada/exp_util.adb
parent07b3e137a246b6b6073c25aac46cb4e8a6fbdf10 (diff)
downloadgcc-6413509bd47c3d3c2c9160d5d13a5d4f40903456.zip
gcc-6413509bd47c3d3c2c9160d5d13a5d4f40903456.tar.gz
gcc-6413509bd47c3d3c2c9160d5d13a5d4f40903456.tar.bz2
Minor reformatting.
From-SVN: r244131
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r--gcc/ada/exp_util.adb27
1 files changed, 16 insertions, 11 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 29d167b..c6e26d4 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -2020,7 +2020,6 @@ package body Exp_Util is
-----------------------------------
function Corresponding_Runtime_Package (Typ : Entity_Id) return RTU_Id is
-
function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean;
-- Return True if protected type T has one entry and the maximum queue
-- length is one.
@@ -2030,37 +2029,43 @@ package body Exp_Util is
--------------------------------
function Has_One_Entry_And_No_Queue (T : Entity_Id) return Boolean is
+ Item : Entity_Id;
Is_First : Boolean := True;
- Ent : Entity_Id;
+
begin
- Ent := First_Entity (T);
- while Present (Ent) loop
- if Is_Entry (Ent) then
- if not Is_First then
- -- More than one entry
+ Item := First_Entity (T);
+ while Present (Item) loop
+ if Is_Entry (Item) then
+ -- The protected type has more than one entry
+
+ if not Is_First then
return False;
end if;
+ -- The queue length is not one
+
if not Restriction_Active (No_Entry_Queue)
- and then Get_Max_Queue_Length (Ent) /= Uint_1
+ and then Get_Max_Queue_Length (Item) /= Uint_1
then
- -- Max queue length is not 1
-
return False;
end if;
Is_First := False;
end if;
- Ent := Next_Entity (Ent);
+ Next_Entity (Item);
end loop;
return True;
end Has_One_Entry_And_No_Queue;
+ -- Local variables
+
Pkg_Id : RTU_Id := RTU_Null;
+ -- Start of processing for Corresponding_Runtime_Package
+
begin
pragma Assert (Is_Concurrent_Type (Typ));