error.c (gfc_fatal_error_1): Remove.

2014-11-24  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.

2014-11-24  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/dollar_sym_3.f: Update dg-error.
        * gfortran.dg/dollar_sym_3.f: Ditto.

From-SVN: r217997
This commit is contained in:
Tobias Burnus 2014-11-24 08:47:46 +01:00 committed by Tobias Burnus
parent c6a4ed03be
commit 29e0597e25
10 changed files with 30 additions and 34 deletions

View File

@ -1,3 +1,13 @@
2014-11-24 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.
2014-11-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054

View File

@ -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;
}

View File

@ -1148,7 +1148,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, ...)
@ -1272,24 +1271,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

View File

@ -2705,7 +2705,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);

View File

@ -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;
}

View File

@ -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)

View File

@ -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;

View File

@ -1,3 +1,8 @@
2014-11-24 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/dollar_sym_3.f: Update dg-error.
* gfortran.dg/dollar_sym_3.f: Ditto.
2014-11-23 David Edelsohn <dje.gcc@gmail.com>
* gcc.dg/autopar/pr46799.c: XFAIL on AIX.

View File

@ -6,5 +6,5 @@ program test
implicit none
intrinsic co_max
integer :: val
call co_max(val) ! { dg-error "Coarrays disabled at .1., use -fcoarray= to enable" }
call co_max(val) ! { dg-error "Coarrays disabled at .1., use '-fcoarray=' to enable" }
end program test

View File

@ -5,6 +5,6 @@
! Contributed by Vittorio Zecca
!
c Segmentation fault in gfc_restore_last_undo_checkpoint
COMMON RADE3155V62$JUTMU9L9E(3,3,3), LADE314JUTMP9 ! { dg-error "Invalid character '\\$' at .1.. Use -fdollar-ok to allow it as an extension" }
COMMON RADE3155V62$JUTMU9L9E(3,3,3), LADE314JUTMP9 ! { dg-error "Invalid character '\\$' at .1.. Use '-fdollar-ok' to allow it as an extension" }
+LHEDDJNTMP9L(3,3,3)
end