From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12736 invoked by alias); 19 Apr 2018 09:25:49 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 12542 invoked by uid 89); 19 Apr 2018 09:25:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Apr 2018 09:25:47 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3BAD08185331; Thu, 19 Apr 2018 09:25:35 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C44942166BAE; Thu, 19 Apr 2018 09:25:34 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w3J9PW0e015888; Thu, 19 Apr 2018 11:25:32 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w3J9PU38015876; Thu, 19 Apr 2018 11:25:30 +0200 Date: Thu, 19 Apr 2018 09:25:00 -0000 From: Jakub Jelinek To: Thomas Schwinge Cc: Thomas =?iso-8859-1?Q?K=F6nig?= , "fortran@gcc.gnu.org" , gcc-patches , vries@gcc.gnu.org Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets) Message-ID: <20180419092530.GY8577@tucnak> Reply-To: Jakub Jelinek References: <751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net> <87in8nsgz9.fsf@euler.schwinge.homeip.net> <20180419091438.GX8577@tucnak> <87muxzbljw.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87muxzbljw.fsf@hertz.schwinge.homeip.net> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-04/txt/msg00101.txt.bz2 On Thu, Apr 19, 2018 at 11:19:31AM +0200, Thomas Schwinge wrote: > Hi! > > On Thu, 19 Apr 2018 11:14:38 +0200, Jakub Jelinek wrote: > > On Thu, Apr 19, 2018 at 11:06:18AM +0200, Thomas Schwinge wrote: > > > On Wed, 4 Apr 2018 11:30:34 +0200, Thomas König wrote: > > > > the recent patch to make the gfortran and libgomp testsuites more > > > > standard conforming, by replacing CALL ABORT() with STOP N, led > > > > to numerous testsuite failures on nvptx because stop_numeric > > > > was not implemented in minimal.c. > > > > > > > > I have committed the patch below in r259072 as obvious after Tom > > > > de Vries had confirmed that it solves the problem. > > > > > > ... for some meaning of "solves the problem"; see below. ;-) Which you > > > couldn't know, of course. (So, definitely thanks anyway, for promptly > > > addressing the issue raised!) > > > > My preference would be just to revert the call abort to stop n changes > > in target regions. > > That seems backwards to me -- having "exit" (as well as Fortran language > "stop" and "error stop") inside offloaded regions do the right thing is > something we wanted to do anyway, eventually. I'm looking for a GCC8 fix, and for that it seems like the simplest and safest solution. > > Mapping exit to abort is weird > > Sure, that's why PR85463 is still open, and has some (initial) > comments/ideas regarding that. > > > and making exit terminate whole process even > > when called from offloaded regions might be too expensive. > > In what way "too expensive"? If you need to add code to handle that case to every target region entry just in case something does stop, the slow down might be too high and unacceptable. Depends on how it is implemented. Jakub