From patchwork Wed Sep 5 11:51:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 966342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-485178-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="lGXJm7Sn"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4252CQ34bMz9s5c for ; Wed, 5 Sep 2018 21:53:22 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references:mime-version :content-type; q=dns; s=default; b=h7bSsbFqKWfH2qa7f43vsdSlU0JX0 wDdzwHgQR1GDMffWgjs4ihvYPA4iaeoeJ9hq4mM0NU5glhVFBH671lECVjyDhauE o7DjnRA+iMtARd5zoRI6FO9JrljRrY/xPiu4zoqDK2KC8RuIM9fEf/kV76Hl+5aT WlN03L2BE6PiPw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references:mime-version :content-type; s=default; bh=tR4l8G9XuyipwoszMJNiHkxWoS8=; b=lGX Jm7SnWcwHMGeBxq6kasdYTavk/lEvvvipV7o3iZ5fC9/etlQksPd3ZFRqRMtRUUJ sOINXL6/ChPmn6nn92C+9MuldlMuNfA7EV1b0nOt6ANwa8sN7VyPfHkHB5hPr/Sh zkbusbdr0zKF2zGzJP+7l/QQ/x6nxRo68lzClG48= Received: (qmail 96200 invoked by alias); 5 Sep 2018 11:51:45 -0000 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 Received: (qmail 96113 invoked by uid 89); 5 Sep 2018 11:51:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.2 spammy=STOP, Hx-languages-length:1003 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 11:51:43 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxWLU-0006AU-A8 for gcc-patches@gcc.gnu.org; Wed, 05 Sep 2018 07:51:42 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:45561) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fxWLU-00069g-0i for gcc-patches@gcc.gnu.org; Wed, 05 Sep 2018 07:51:40 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fxWLS-0005rZ-UJ from Andrew_Stubbs@mentor.com for gcc-patches@gcc.gnu.org; Wed, 05 Sep 2018 04:51:38 -0700 Received: from build6-trusty-cs.sje.mentorg.com (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 5 Sep 2018 12:51:34 +0100 From: To: Subject: [PATCH 17/25] Fix Fortran STOP. Date: Wed, 5 Sep 2018 12:51:18 +0100 Message-ID: <3b1ee6252e6bc42be1886f45fd4512efda27bcbd.1536144068.git.ams@codesourcery.com> In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 The minimal libgfortran setup was created for NVPTX, but will also be used by AMD GCN. This patch simply removes an assumption that NVPTX is the only user. Specifically, NVPTX exit is broken, but AMD GCN exit works just fine. 2018-09-05 Andrew Stubbs libgfortran/ * runtime/minimal.c (exit): Only work around nvptx bugs on nvptx. --- libgfortran/runtime/minimal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c index 0b1efeb..8940f97 100644 --- a/libgfortran/runtime/minimal.c +++ b/libgfortran/runtime/minimal.c @@ -197,10 +197,12 @@ sys_abort (void) #define st_printf printf #undef estr_write #define estr_write printf +#if __nvptx__ /* Map "exit" to "abort"; see PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'. */ #undef exit #define exit(...) do { abort (); } while (0) +#endif #undef exit_error #define exit_error(...) do { abort (); } while (0)