diff options
Diffstat (limited to 'gcc/fortran/error.c')
-rw-r--r-- | gcc/fortran/error.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 6cfe019e8a..49ede5a71f 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -1303,10 +1303,15 @@ gfc_error (const char *gmsgid, ...) void gfc_internal_error (const char *gmsgid, ...) { + int e, w; va_list argp; diagnostic_info diagnostic; rich_location rich_loc (line_table, UNKNOWN_LOCATION); + gfc_get_errors (&w, &e); + if (e > 0) + exit(EXIT_FAILURE); + va_start (argp, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &argp, &rich_loc, DK_ICE); report_diagnostic (&diagnostic); |