diff options
author | Kwok Cheung Yeung <kcy@codesourcery.com> | 2018-09-12 13:53:34 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@gcc.gnu.org> | 2018-09-12 13:53:34 +0000 |
commit | 72ced87475c02fc6d4211a9baa41a8c8bb14ab0c (patch) | |
tree | 854875f5b91ae1001d9e908f3f2447010a0ce667 /libgfortran/runtime | |
parent | 4986a9568afe47845e3bd51fb7d2c5c1dd065ba2 (diff) | |
download | gcc-72ced87475c02fc6d4211a9baa41a8c8bb14ab0c.zip gcc-72ced87475c02fc6d4211a9baa41a8c8bb14ab0c.tar.gz gcc-72ced87475c02fc6d4211a9baa41a8c8bb14ab0c.tar.bz2 |
Fix interleaving of Fortran STOP messages
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-12 Kwok Cheung Yeung <kcy@codesourcery.com>
libgfortran/
* runtime/minimal.c (estr_write): Define in terms of write.
From-SVN: r264239
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/minimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
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'. */ |