OSDN Git Service

gcc/ada/
authorsam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Nov 2007 22:20:15 +0000 (22:20 +0000)
committersam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Nov 2007 22:20:15 +0000 (22:20 +0000)
* a-tasatt.adb: Revert previous change for this file as it will
generate an error when this package is instantiated from a
local context.

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

gcc/ada/ChangeLog
gcc/ada/a-tasatt.adb

index c8bfcf3..1ea33a6 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-10  Samuel Tardieu  <sam@rfc1149.net>
+
+       * a-tasatt.adb: Revert previous change for this file as it will
+       generate an error when this package is instantiated from a
+       local context.
+
 2007-11-07  Samuel Tardieu  <sam@rfc1149.net>
 
        * a-tasatt.adb: Type Wrapper should be declared in comment instead
index cd20591..97e024c 100644 (file)
@@ -415,7 +415,7 @@ package body Ada.Task_Attributes is
             POP.Lock_RTS;
 
             while P /= null loop
-               if P.Instance = Access_Instance'(Local'Access) then
+               if P.Instance = Access_Instance'(Local'Unchecked_Access) then
                   POP.Unlock_RTS;
                   Undefer_Abort (Self_Id);
                   return To_Access_Wrapper (P.Wrapper).Value'Access;
@@ -429,10 +429,11 @@ package body Ada.Task_Attributes is
             --  holding any other lock.
 
             POP.Unlock_RTS;
-            W := new Wrapper'((null, Local'Access, null), Initial_Value);
+            W := new Wrapper'
+                  ((null, Local'Unchecked_Access, null), Initial_Value);
             POP.Lock_RTS;
 
-            P := W.Dummy_Node'Access;
+            P := W.Dummy_Node'Unchecked_Access;
             P.Wrapper := To_Access_Dummy_Wrapper (W);
             P.Next := To_Access_Node (TT.Indirect_Attributes);
             TT.Indirect_Attributes := To_Access_Address (P);
@@ -493,7 +494,7 @@ package body Ada.Task_Attributes is
             Q := To_Access_Node (TT.Indirect_Attributes);
 
             while Q /= null loop
-               if Q.Instance = Access_Instance'(Local'Access) then
+               if Q.Instance = Access_Instance'(Local'Unchecked_Access) then
                   if P = null then
                      TT.Indirect_Attributes := To_Access_Address (Q.Next);
                   else
@@ -580,7 +581,7 @@ package body Ada.Task_Attributes is
 
          while P /= null loop
 
-            if P.Instance = Access_Instance'(Local'Access) then
+            if P.Instance = Access_Instance'(Local'Unchecked_Access) then
                To_Access_Wrapper (P.Wrapper).Value := Val;
                POP.Unlock_RTS;
                Undefer_Abort (Self_Id);
@@ -594,9 +595,9 @@ package body Ada.Task_Attributes is
          --  from using new (i.e the Global_Lock) while holding any other lock.
 
          POP.Unlock_RTS;
-         W := new Wrapper'((null, Local'Access, null), Val);
+         W := new Wrapper'((null, Local'Unchecked_Access, null), Val);
          POP.Lock_RTS;
-         P := W.Dummy_Node'Access;
+         P := W.Dummy_Node'Unchecked_Access;
          P.Wrapper := To_Access_Dummy_Wrapper (W);
          P.Next := To_Access_Node (TT.Indirect_Attributes);
          TT.Indirect_Attributes := To_Access_Address (P);
@@ -668,7 +669,7 @@ package body Ada.Task_Attributes is
          P := To_Access_Node (TT.Indirect_Attributes);
 
          while P /= null loop
-            if P.Instance = Access_Instance'(Local'Access) then
+            if P.Instance = Access_Instance'(Local'Unchecked_Access) then
                Result := To_Access_Wrapper (P.Wrapper).Value;
                POP.Unlock_RTS;
                Undefer_Abort (Self_Id);
@@ -723,7 +724,8 @@ begin
       --  Add this instantiation to the list of all instantiations
 
       Local.Next := System.Tasking.Task_Attributes.All_Attributes;
-      System.Tasking.Task_Attributes.All_Attributes := Local'Access;
+      System.Tasking.Task_Attributes.All_Attributes :=
+        Local'Unchecked_Access;
 
       --  Try to find space for the attribute in the TCB