This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ada] Fix bootstrap error in s-taprop-tru64.adb


Tru64 UNIX Ada bootstrap recently got broken:

s-taprop.adb:892:12: access to volatile object cannot yield access-to-non-volatile type
make[6]: *** [s-taprop.o] Error 1

s-taprop-tru64.adb missed a patch already applied to s-taprop-{irix,
solaris}.adb.  With that change, the bootstrap continues and
libgnat-4.7.so built.

Ok for mainline?

	Rainer


2011-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.

# HG changeset patch
# Parent e66650faff232e847ecd34c2b4ada1f361149fe6
Fix bootstrap error in s-taprop-tru64.adb

	gcc/ada:
	* s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.

diff --git a/gcc/ada/s-taprop-tru64.adb b/gcc/ada/s-taprop-tru64.adb
--- a/gcc/ada/s-taprop-tru64.adb
+++ b/gcc/ada/s-taprop-tru64.adb
@@ -887,9 +887,15 @@ package body System.Task_Primitives.Oper
       --  do not need to manipulate caller's signal mask at this point.
       --  All tasks in RTS will have All_Tasks_Mask initially.
 
+      --  Note: the use of Unrestricted_Access in the following call is needed
+      --  because otherwise we have an error of getting a access-to-volatile
+      --  value which points to a non-volatile object. But in this case it is
+      --  safe to do this, since we know we have no problems with aliasing and
+      --  Unrestricted_Access bypasses this check.
+
       Result :=
         pthread_create
-          (T.Common.LL.Thread'Access,
+          (T.Common.LL.Thread'Unrestricted_Access,
            Attributes'Access,
            Thread_Body_Access (Wrapper),
            To_Address (T));

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]