diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h --- a/openmp/libomptarget/src/private.h +++ b/openmp/libomptarget/src/private.h @@ -66,17 +66,19 @@ // implementation for fatal messages //////////////////////////////////////////////////////////////////////////////// -#define FATAL_MESSAGE0(_num, _str) \ - do { \ - fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \ - exit(1); \ +#define FATAL_MESSAGE0(_num, _str) \ + do { \ + fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \ + fflush(stderr); \ + abort(); \ } while (0) -#define FATAL_MESSAGE(_num, _str, ...) \ - do { \ - fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \ - __VA_ARGS__); \ - exit(1); \ +#define FATAL_MESSAGE(_num, _str, ...) \ + do { \ + fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \ + __VA_ARGS__); \ + fflush(stderr); \ + abort(); \ } while (0) // Implemented in libomp, they are called from within __tgt_* functions.