From patchwork Wed Nov 23 12:31:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 127292 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E2ADA1007D4 for ; Wed, 23 Nov 2011 23:32:24 +1100 (EST) Received: (qmail 1938 invoked by alias); 23 Nov 2011 12:32:18 -0000 Received: (qmail 1915 invoked by uid 22791); 23 Nov 2011 12:32:15 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_BG, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Nov 2011 12:31:59 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 42778F82; Wed, 23 Nov 2011 13:31:58 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6oKhP191+hZh; Wed, 23 Nov 2011 13:31:56 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 682EDF81; Wed, 23 Nov 2011 13:31:56 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id pANCVtnR016541; Wed, 23 Nov 2011 13:31:55 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet Subject: [ada] Fix bootstrap error in s-taprop-tru64.adb Date: Wed, 23 Nov 2011 13:31:55 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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));