diff --git a/flang/include/flang/Runtime/stop.h b/flang/include/flang/Runtime/stop.h --- a/flang/include/flang/Runtime/stop.h +++ b/flang/include/flang/Runtime/stop.h @@ -32,7 +32,8 @@ // Crash with an error message when the program dynamically violates a Fortran // constraint. -NORETURN void RTNAME(Crash)(const char *message, const char *source, int line); +NORETURN void RTNAME(ReportFatalUserError)( + const char *message, const char *source, int line); FORTRAN_EXTERN_C_END diff --git a/flang/runtime/stop.cpp b/flang/runtime/stop.cpp --- a/flang/runtime/stop.cpp +++ b/flang/runtime/stop.cpp @@ -144,7 +144,7 @@ [[noreturn]] void RTNAME(Abort)() { std::abort(); } -[[noreturn]] void RTNAME(Crash)( +[[noreturn]] void RTNAME(ReportFatalUserError)( const char *message, const char *source, int line) { Fortran::runtime::Terminator{source, line}.Crash(message); } diff --git a/flang/unittests/Runtime/Stop.cpp b/flang/unittests/Runtime/Stop.cpp --- a/flang/unittests/Runtime/Stop.cpp +++ b/flang/unittests/Runtime/Stop.cpp @@ -91,6 +91,7 @@ static const std::string tailMessage{":343\\): "}; static const std::string fullMessage{ headMessage + fileName + tailMessage + crashMessage}; - EXPECT_DEATH(RTNAME(Crash)(crashMessage.c_str(), fileName.c_str(), 343), + EXPECT_DEATH( + RTNAME(ReportFatalUserError)(crashMessage.c_str(), fileName.c_str(), 343), fullMessage.c_str()); }