From: Tobias Burnus Date: Mon, 24 Nov 2014 07:47:46 +0000 (+0100) Subject: error.c (gfc_fatal_error_1): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29e0597e2530cc21fe964e35c6cfbfadfb08a01e;p=gcc.git error.c (gfc_fatal_error_1): Remove. 2014-11-24 Tobias Burnus * 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 * gfortran.dg/dollar_sym_3.f: Update dg-error. * gfortran.dg/dollar_sym_3.f: Ditto. From-SVN: r217997 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b79f9c23be5..e797d44c8b7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2014-11-24 Tobias Burnus + + * 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 PR fortran/44054 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 034b329886f..8da59d5888a 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -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; } diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 471e0ecc860..202dd88fd4f 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -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 diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 63a8d1508ad..1b2602806d8 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -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); diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index a03b5f10d85..a157fe7515f 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -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; } diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 4e5fd68383e..218d27444f9 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -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) diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index a95809cf0dd..d17b0758d2c 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 45f22b8c8d0..084e45c24c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-24 Tobias Burnus + + * gfortran.dg/dollar_sym_3.f: Update dg-error. + * gfortran.dg/dollar_sym_3.f: Ditto. + 2014-11-23 David Edelsohn * gcc.dg/autopar/pr46799.c: XFAIL on AIX. diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 index 971ee6ad170..bb4d2d3a307 100644 --- a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_3.f b/gcc/testsuite/gfortran.dg/dollar_sym_3.f index 7cf2047eda0..8b2644540a9 100644 --- a/gcc/testsuite/gfortran.dg/dollar_sym_3.f +++ b/gcc/testsuite/gfortran.dg/dollar_sym_3.f @@ -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