Skip to content

Commit bb179c4

Browse files
authored
[flang][rt] Allow ReportFatalUserError to be build on device (#133979)
1 parent ec59313 commit bb179c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flang-rt/lib/runtime/stop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static RT_NOINLINE_ATTR void PrintBacktrace() {
240240

241241
RT_OPTNONE_ATTR void FORTRAN_PROCEDURE_NAME(backtrace)() { PrintBacktrace(); }
242242

243-
[[noreturn]] void RTNAME(ReportFatalUserError)(
243+
[[noreturn]] RT_API_ATTRS void RTNAME(ReportFatalUserError)(
244244
const char *message, const char *source, int line) {
245245
Fortran::runtime::Terminator{source, line}.Crash(message);
246246
}

flang/include/flang/Runtime/stop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void FORTRAN_PROCEDURE_NAME(backtrace)(NO_ARGUMENTS);
3535

3636
// Crash with an error message when the program dynamically violates a Fortran
3737
// constraint.
38-
NORETURN void RTNAME(ReportFatalUserError)(
38+
NORETURN RT_API_ATTRS void RTNAME(ReportFatalUserError)(
3939
const char *message, const char *source, int line);
4040

4141
FORTRAN_EXTERN_C_END

0 commit comments

Comments
 (0)