From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102533 invoked by alias); 5 Dec 2017 18:09:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 102515 invoked by uid 89); 5 Dec 2017 18:09:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_00,RCVD_IN_BRBL_LASTEXT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:525 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 18:09:19 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 290A4813A1; Tue, 5 Dec 2017 19:09:16 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PYDhqpAlEb6V; Tue, 5 Dec 2017 19:09:16 +0100 (CET) Received: from chelles.act-europe.fr (chelles.act-europe.fr [IPv6:2a02:2ab8:224:1:d6be:d9ff:fef8:4565]) by smtp.eu.adacore.com (Postfix) with ESMTP id 15AED81392; Tue, 5 Dec 2017 19:09:15 +0100 (CET) Received: by chelles.act-europe.fr (Postfix, from userid 525) id EA3291EA0067; Tue, 5 Dec 2017 19:09:15 +0100 (CET) Date: Tue, 05 Dec 2017 18:09:00 -0000 From: Arnaud Charlet To: Simon Wright Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime Message-ID: <20171205180915.GA21842@adacore.com> References: <7942AA17-3258-4B36-8B93-35C0574583AA@pushface.org> <666D196C-C248-45B3-A20F-138CE6B00457@pushface.org> <20151112100205.GA9491@adacore.com> <146E92A8-A4E2-420F-A83D-92A585E32A2A@pushface.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2017-12/txt/msg00257.txt.bz2 > I've come up with a considerably simpler patch, which merely causes the > procedure adafinal to be generated with a null body if the restriction > No_Task_Termination is set (note, this restriction is part of the > Ravenscar profile; if tasks can't terminate, program level finalization > can't happen [ARM 10.2(25), "When the environment task completes > (normally or abnormally), it waits for the termination of all such tasks, > and then finalizes any remaining objects of the partition."] > > I've bootstrapped the compiler (x86_64-apple-darwin15), and "make > check-ada" produces the same results with and without the patch (the same 3 > FAILs occur in both, in gnat.sum). For the arm-eabi compiler, I > successfully make and run builds for an STM32F4 target without exception > propagation but with and without finalization. That's a much simpler and better approach indeed. OK to commit. > gcc/ada/Changelog: > > 2017-12-05 Simon Wright > > PR ada/66205 > * bindgen.adb (Gen_AdaFinal): If the restriction > No_Task_Termination is present, generate a null body. >