From c55843761ee68181da8999336b941cb7894b94bc Mon Sep 17 00:00:00 2001 From: ams Date: Wed, 12 Sep 2018 13:53:32 +0000 Subject: [PATCH] Fix Fortran STOP. 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-12 Andrew Stubbs libgfortran/ * runtime/minimal.c (exit): Only work around nvptx bugs on nvptx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264238 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/ChangeLog | 4 ++++ libgfortran/runtime/minimal.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e13390bd23b8..00a07b19255b 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2018-09-12 Andrew Stubbs + + * runtime/minimal.c (exit): Only work around nvptx bugs on nvptx. + 2018-09-07 Janne Blomqvist * runtime/environ.c (init_unsigned_integer): Remove. diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c index 0b1efeb0d58b..8940f975160c 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) -- 2.47.2