From 55e9d3a6236e99d3dde9b769294f83935b6e674b Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 10 Nov 2007 22:20:15 +0000 Subject: [PATCH] gcc/ada/ * 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 | 6 ++++++ gcc/ada/a-tasatt.adb | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c8bfcf3c208..1ea33a6c0a2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2007-11-10 Samuel Tardieu + + * 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 * a-tasatt.adb: Type Wrapper should be declared in comment instead diff --git a/gcc/ada/a-tasatt.adb b/gcc/ada/a-tasatt.adb index cd205915708..97e024c0657 100644 --- a/gcc/ada/a-tasatt.adb +++ b/gcc/ada/a-tasatt.adb @@ -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 -- 2.11.0