2011-10-15 Bob Duff <duff@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Oct 2011 09:22:01 +0000 (09:22 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Oct 2011 09:22:01 +0000 (09:22 +0000)
* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
is available.
(Expand_N_Extended_Return_Statement): Do not create a renaming of the
build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
available.
(Make_Build_In_Place_Call_In_Allocator): Add the user-defined
pool only if RE_Root_Storage_Pool_Ptr is available.
(Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
pool actual unless RE_Root_Storage_Pool_Ptr is available.
* sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
formal only if RE_Root_Storage_Pool_Ptr is available.

2011-10-15  Matthew Heaney  <heaney@adacore.com>

* a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
type): Specify Priority aspect for protected type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180025 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/a-cbprqu.ads
gcc/ada/a-cbsyqu.ads
gcc/ada/a-cuprqu.ads
gcc/ada/a-cusyqu.ads
gcc/ada/exp_ch6.adb
gcc/ada/sem_ch6.adb

index 5ca9b97..891ac96 100644 (file)
@@ -1,3 +1,23 @@
+2011-10-15  Bob Duff  <duff@adacore.com>
+
+       * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
+       Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
+       is available.
+       (Expand_N_Extended_Return_Statement): Do not create a renaming of the
+       build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
+       available.
+       (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
+       pool only if RE_Root_Storage_Pool_Ptr is available.
+       (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
+       pool actual unless RE_Root_Storage_Pool_Ptr is available.
+       * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
+       formal only if RE_Root_Storage_Pool_Ptr is available.
+
+2011-10-15  Matthew Heaney  <heaney@adacore.com>
+
+       * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
+       type): Specify Priority aspect for protected type.
+
 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
 
        * exp_disp.adb (Check_Premature_Freezing): If an untagged type
index 0d0f168..d8a53f2 100644 (file)
@@ -101,9 +101,7 @@ package Ada.Containers.Bounded_Priority_Queues is
    protected type Queue
      (Capacity : Count_Type := Default_Capacity;
       Ceiling  : System.Any_Priority := Default_Ceiling)
-   --  ???
-   --  with Priority => Ceiling is new Queue_Interfaces.Queue with
-   is new Queue_Interfaces.Queue with
+     with Priority => Ceiling is new Queue_Interfaces.Queue with
 
       overriding
       entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
index 8d25359..17b0a5a 100644 (file)
@@ -83,9 +83,7 @@ package Ada.Containers.Bounded_Synchronized_Queues is
    protected type Queue
      (Capacity : Count_Type := Default_Capacity;
       Ceiling  : System.Any_Priority := Default_Ceiling)
-   --  ???
-   --  with Priority => Ceiling is new Queue_Interfaces.Queue with
-   is new Queue_Interfaces.Queue with
+     with Priority => Ceiling is new Queue_Interfaces.Queue with
 
       overriding
       entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
index 33db4a2..f7d4d4c 100644 (file)
@@ -100,9 +100,7 @@ package Ada.Containers.Unbounded_Priority_Queues is
    end Implementation;
 
    protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling)
-      --  ???
-      --  with Priority => Ceiling is new Queue_Interfaces.Queue with
-      is new Queue_Interfaces.Queue with
+     with Priority => Ceiling is new Queue_Interfaces.Queue with
 
       overriding
       entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
index 98337a0..20e584d 100644 (file)
@@ -86,9 +86,7 @@ package Ada.Containers.Unbounded_Synchronized_Queues is
    end Implementation;
 
    protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling)
-     --  ???
-     --  with Priority => Ceiling is new Queue_Interfaces.Queue with
-     is new Queue_Interfaces.Queue with
+     with Priority => Ceiling is new Queue_Interfaces.Queue with
 
       overriding
       entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
index 035c433..17b72cf 100644 (file)
@@ -311,10 +311,12 @@ package body Exp_Ch6 is
       Add_Extra_Actual_To_Call
         (Function_Call, Alloc_Form_Formal, Alloc_Form_Actual);
 
-      --  Pass the Storage_Pool parameter. This parameter is omitted on .NET
-      --  and JVM as those targets do not support pools.
+      --  Pass the Storage_Pool parameter. This parameter is omitted
+      --  .NET/JVM/ZFP as those targets do not support pools.
 
-      if VM_Target = No_VM then
+      if
+        VM_Target = No_VM and then RTE_Available (RE_Root_Storage_Pool_Ptr)
+      then
          Pool_Formal := Build_In_Place_Formal (Function_Id, BIP_Storage_Pool);
          Analyze_And_Resolve (Pool_Actual, Etype (Pool_Formal));
          Add_Extra_Actual_To_Call
@@ -5241,10 +5243,12 @@ package body Exp_Ch6 is
                      Pool_Allocator := New_Copy_Tree (Heap_Allocator);
 
                      --  Do not generate the renaming of the build-in-place
-                     --  pool parameter on .NET/JVM because the parameter is
-                     --  not created in the first place.
+                     --  pool parameter on .NET/JVM/ZFP because the parameter
+                     --  is not created in the first place.
 
-                     if VM_Target = No_VM then
+                     if VM_Target = No_VM and then
+                       RTE_Available (RE_Root_Storage_Pool_Ptr)
+                     then
                         Pool_Decl :=
                           Make_Object_Renaming_Declaration (Loc,
                             Defining_Identifier => Pool_Id,
@@ -8137,7 +8141,9 @@ package body Exp_Ch6 is
          --  has an unconstrained or tagged result type).
 
          if Needs_BIP_Alloc_Form (Enclosing_Func) then
-            if VM_Target = No_VM then
+            if VM_Target = No_VM and then
+              RTE_Available (RE_Root_Storage_Pool_Ptr)
+            then
                Pool_Actual :=
                  New_Reference_To (Build_In_Place_Formal
                    (Enclosing_Func, BIP_Storage_Pool), Loc);
index 4ebf967..6cf630a 100644 (file)
@@ -6487,10 +6487,12 @@ package body Sem_Ch6 is
                     E, BIP_Formal_Suffix (BIP_Alloc_Form));
 
                --  Add BIP_Storage_Pool, in case BIP_Alloc_Form indicates to
-               --  use a user-defined pool. This formal is not added on .NET
-               --  and JVM as those targets do not support pools.
+               --  use a user-defined pool. This formal is not added on
+               --  .NET/JVM/ZFP as those targets do not support pools.
 
-               if VM_Target = No_VM then
+               if VM_Target = No_VM and then
+                 RTE_Available (RE_Root_Storage_Pool_Ptr)
+               then
                   Discard :=
                     Add_Extra_Formal
                       (E, RTE (RE_Root_Storage_Pool_Ptr),