From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11213 invoked by alias); 5 Sep 2018 16:57:53 -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 11202 invoked by uid 89); 5 Sep 2018 16:57:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=H*M:2494 X-HELO: moene.org Received: from moene.org (HELO moene.org) (80.101.130.238) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 16:57:51 +0000 Received: from localhost ([127.0.0.1] helo=moene.org) by moene.org with esmtp (Exim 4.91) (envelope-from ) id 1fxb7l-0004hQ-ON for fortran@gcc.gnu.org; Wed, 05 Sep 2018 18:57:49 +0200 Subject: Fwd: [PATCH 18/25] Fix interleaving of Fortran stop messages References: <2ba94a85fe9c01c57e474a4cc6b7171cc0adb351.1536144068.git.ams@codesourcery.com> To: gfortran From: Toon Moene X-Forwarded-Message-Id: <2ba94a85fe9c01c57e474a4cc6b7171cc0adb351.1536144068.git.ams@codesourcery.com> Message-ID: <994a9ec6-2494-9a83-cc84-bd8a551142c5@moene.org> Date: Wed, 05 Sep 2018 16:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2ba94a85fe9c01c57e474a4cc6b7171cc0adb351.1536144068.git.ams@codesourcery.com> Content-Type: multipart/mixed; boundary="------------68306AA039E24C7191716D9E" X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00055.txt.bz2 This is a multi-part message in MIME format. --------------68306AA039E24C7191716D9E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 834 -------- Forwarded Message -------- Subject: [PATCH 18/25] Fix interleaving of Fortran stop messages Date: Wed, 5 Sep 2018 12:51:19 +0100 From: ams@codesourcery.com To: gcc-patches@gcc.gnu.org Fortran STOP and ERROR STOP use a different function to print the "STOP" string and the message string. On GCN this results in out-of-order output, such as "ERROR STOP ". This patch fixes the problem by making estr_write use the proper Fortran write, not C printf, so both parts are now output the same way. This also ensures that both parts are output to STDERR (not that that means anything on GCN). 2018-09-05 Kwok Cheung Yeung libgfortran/ * runtime/minimal.c (estr_write): Define in terms of write. --- libgfortran/runtime/minimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --------------68306AA039E24C7191716D9E Content-Type: text/x-patch; name="0018-Fix-interleaving-of-Fortran-stop-messages.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0018-Fix-interleaving-of-Fortran-stop-messages.patch" Content-length: 492 diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c index 8940f97..b6d26fd 100644 --- a/libgfortran/runtime/minimal.c +++ b/libgfortran/runtime/minimal.c @@ -196,7 +196,7 @@ sys_abort (void) #undef st_printf #define st_printf printf #undef estr_write -#define estr_write printf +#define estr_write(X) write(STDERR_FILENO, (X), strlen (X)) #if __nvptx__ /* Map "exit" to "abort"; see PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'. */ --------------68306AA039E24C7191716D9E--