2014-11-23 Tobias Burnus <burnus@net-b.de>
* error.c (gfc_fatal_error_1): Remove.
* gfortran.h (gfc_fatal_error_1): Remove.
* check.c (check_co_collective): Change gfc_fatal_error_1 to
gfc_fatal_error.
* match.c (gfc_match_name): Ditto.
* trans-array.c (gfc_conv_array_initializer): Ditto.
* trans-stmt.c (gfc_trans_sync): Ditto.
@@ -1482,8 +1482,8 @@ check_co_collective (gfc_expr *a, gfc_expr *image_idx, gfc_expr *stat,
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
{
- gfc_fatal_error_1 ("Coarrays disabled at %L, use -fcoarray= to enable",
- &a->where);
+ gfc_fatal_error ("Coarrays disabled at %L, use %<-fcoarray=%> to enable",
+ &a->where);
return false;
}
@@ -1141,7 +1141,6 @@ gfc_error_now_2 (const char *gmsgid, ...)
/* Fatal error, never returns. */
-/* This function uses the common diagnostics, but does not support %L, yet. */
void
gfc_fatal_error (const char *gmsgid, ...)
@@ -1265,24 +1264,6 @@ gfc_error_now (const char *gmsgid, ...)
}
-/* Fatal error, never returns. */
-/* Use gfc_fatal_error instead, unless gmsgid contains a %L. */
-
-void
-gfc_fatal_error_1 (const char *gmsgid, ...)
-{
- va_list argp;
-
- buffer_flag = 0;
-
- va_start (argp, gmsgid);
- error_print (_("Fatal Error:"), _(gmsgid), argp);
- va_end (argp);
-
- exit (FATAL_EXIT_CODE);
-}
-
-
/* This shouldn't happen... but sometimes does. */
void
@@ -2706,7 +2706,6 @@ void gfc_warning_check (void);
void gfc_error (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
void gfc_error_now (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
void gfc_error_now_2 (const char *gmsgid, ...) ATTRIBUTE_GCC_GFC(1,2);
-void gfc_fatal_error_1 (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
void gfc_fatal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
void gfc_internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
void gfc_clear_error (void);
@@ -557,8 +557,8 @@ gfc_match_name (char *buffer)
if (c == '$' && !gfc_option.flag_dollar_ok)
{
- gfc_fatal_error_1 ("Invalid character '$' at %L. Use -fdollar-ok to allow"
- " it as an extension", &old_loc);
+ gfc_fatal_error ("Invalid character %<$%> at %L. Use %<-fdollar-ok%> to "
+ "allow it as an extension", &old_loc);
return MATCH_ERROR;
}
@@ -5425,11 +5425,12 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr)
{
/* Problems occur when we get something like
integer :: a(lots) = (/(i, i=1, lots)/) */
- gfc_fatal_error_1 ("The number of elements in the array "
- "constructor at %L requires an increase of "
- "the allowed %d upper limit. See "
- "-fmax-array-constructor option", &expr->where,
- gfc_option.flag_max_array_constructor);
+ gfc_fatal_error ("The number of elements in the array "
+ "constructor at %L requires an increase of "
+ "the allowed %d upper limit. See "
+ "%<-fmax-array-constructor%> option",
+ &expr->where,
+ gfc_option.flag_max_array_constructor);
return NULL_TREE;
}
if (mpz_cmp_si (c->offset, 0) != 0)
@@ -865,9 +865,9 @@ gfc_trans_sync (gfc_code *code, gfc_exec_op type)
{
/* FIXME. */
if (code->expr1->ts.kind != gfc_c_int_kind)
- gfc_fatal_error_1 ("Sorry, only support for integer kind %d "
- "implemented for image-set at %L",
- gfc_c_int_kind, &code->expr1->where);
+ gfc_fatal_error ("Sorry, only support for integer kind %d "
+ "implemented for image-set at %L",
+ gfc_c_int_kind, &code->expr1->where);
gfc_conv_array_parameter (&se, code->expr1, true, NULL, NULL, &len);
images = se.expr;