From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49114 invoked by alias); 19 Dec 2017 08:41:33 -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 47673 invoked by uid 89); 19 Dec 2017 08:40:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=wright, metal, our, among 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, 19 Dec 2017 08:40:33 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A4D478138B; Tue, 19 Dec 2017 09:40:30 +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 78ot6SH4zx_U; Tue, 19 Dec 2017 09:40:30 +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 80A638137E; Tue, 19 Dec 2017 09:40:30 +0100 (CET) Received: by chelles.act-europe.fr (Postfix, from userid 525) id 7E1761EA0068; Tue, 19 Dec 2017 09:40:30 +0100 (CET) Date: Tue, 19 Dec 2017 08:41:00 -0000 From: Arnaud Charlet To: Simon Wright Cc: gcc-patches@gcc.gnu.org, Eric Botcazou , Pierre-Marie de Rodat Subject: Re: [PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime Message-ID: <20171219084030.GA16744@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/msg01223.txt.bz2 Simon, Unfortunately we've discovered that your patch is causing unexpected consequences and break e.g. testing of ravenscar application, where although the Ada RM requires no task termination, for practical purposes, waiting for terminating task is something we rely upon for automatic testing, so your patch is suitable after all, sorry about the oversight. After internal discussions at AdaCore, it appears that if you want Finalization, you chould set Suppress_Standard_Library_On_Target to False. All your troubles come from the fac tthat you tries to stick to Suppress_Standard_Library_On_Target set to True, but this combination (Suppress_Standard_Library_On_Target set to True, and Finalization enabled) is simpled not supported in the GNAT runtime, and the binder doesn't expect it either. So I'm going to revert your change in bindgen.adb and will let you experiment with setting Suppress_Standard_Library_On_Target to False in your system.ads. This is what we do in e.g.. our ravenscar-full runtime which supports precisely both ravenscar tasking, and finalization (among other things), on bare metal targets, which seems to correspond to what you are trying to do. Arno > 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.