public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: [PATCH 18/25] Fix interleaving of Fortran stop messages
       [not found] <2ba94a85fe9c01c57e474a4cc6b7171cc0adb351.1536144068.git.ams@codesourcery.com>
@ 2018-09-05 16:57 ` Toon Moene
  2018-09-05 17:15   ` Bernhard Reutner-Fischer
  2018-09-05 18:11   ` Janne Blomqvist
  0 siblings, 2 replies; 4+ messages in thread
From: Toon Moene @ 2018-09-05 16:57 UTC (permalink / raw)
  To: gfortran

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]




-------- 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
"<msg>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  <kcy@codesourcery.com>

	libgfortran/
	* runtime/minimal.c (estr_write): Define in terms of write.
---
  libgfortran/runtime/minimal.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)



[-- Attachment #2: 0018-Fix-interleaving-of-Fortran-stop-messages.patch --]
[-- Type: text/x-patch, Size: 492 bytes --]

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'.  */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 18/25] Fix interleaving of Fortran stop messages
  2018-09-05 16:57 ` Fwd: [PATCH 18/25] Fix interleaving of Fortran stop messages Toon Moene
@ 2018-09-05 17:15   ` Bernhard Reutner-Fischer
  2018-09-05 18:11   ` Janne Blomqvist
  1 sibling, 0 replies; 4+ messages in thread
From: Bernhard Reutner-Fischer @ 2018-09-05 17:15 UTC (permalink / raw)
  To: toon; +Cc: gfortran

On Wed, 5 Sep 2018 at 18:57, Toon Moene <toon@moene.org> wrote:
>
>

Right. LGTM but i cannot approve it.

cheers,
>
>
> -------- 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
> "<msg>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  <kcy@codesourcery.com>
>
>         libgfortran/
>         * runtime/minimal.c (estr_write): Define in terms of write.
> ---
>   libgfortran/runtime/minimal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 18/25] Fix interleaving of Fortran stop messages
  2018-09-05 16:57 ` Fwd: [PATCH 18/25] Fix interleaving of Fortran stop messages Toon Moene
  2018-09-05 17:15   ` Bernhard Reutner-Fischer
@ 2018-09-05 18:11   ` Janne Blomqvist
  2018-09-12 13:55     ` Andrew Stubbs
  1 sibling, 1 reply; 4+ messages in thread
From: Janne Blomqvist @ 2018-09-05 18:11 UTC (permalink / raw)
  To: Toon Moene, GCC Patches, ams; +Cc: Fortran List

On Wed, Sep 5, 2018 at 7:57 PM Toon Moene <toon@moene.org> wrote:

>
>
>
> -------- 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
> "<msg>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  <kcy@codesourcery.com>
>
>         libgfortran/
>         * runtime/minimal.c (estr_write): Define in terms of write.
> ---
>   libgfortran/runtime/minimal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>
>
Ok, thanks.

-- 
Janne Blomqvist

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 18/25] Fix interleaving of Fortran stop messages
  2018-09-05 18:11   ` Janne Blomqvist
@ 2018-09-12 13:55     ` Andrew Stubbs
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Stubbs @ 2018-09-12 13:55 UTC (permalink / raw)
  To: Janne Blomqvist, Toon Moene, GCC Patches; +Cc: Fortran List

On 05/09/18 19:11, Janne Blomqvist wrote:
> Ok, thanks.

Committed, thanks.

Apologies again for missing the Fortran list.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-12 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2ba94a85fe9c01c57e474a4cc6b7171cc0adb351.1536144068.git.ams@codesourcery.com>
2018-09-05 16:57 ` Fwd: [PATCH 18/25] Fix interleaving of Fortran stop messages Toon Moene
2018-09-05 17:15   ` Bernhard Reutner-Fischer
2018-09-05 18:11   ` Janne Blomqvist
2018-09-12 13:55     ` Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).