error.c (gfc_internal_error): Convert to common diagnostics.

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

        * error.c (gfc_internal_error): Convert to common diagnostics.
        * interface.c (gfc_find_sym_in_symtree): Use %qs.
        * intrinsic.c (make_generic, gfc_check_intrinsic_standard,
        gfc_convert_type_warn): Ditto.
        * module.c (write_symbol): Ditto.
        * symbol.c (gfc_get_default_type): Ditto; use fatal instead
        of internal error.
        * trans-array.c (gfc_walk_subexpr): Replace internal_error by
        gfc_internal_error.
        * trans-decl.c (gfc_get_symbol_decl,
        (gfc_create_module_variable): Ditto. Use %qs.
        * trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Ditto.
        * trans-io.c (transfer_expr): Ditto.
        * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
        * trans.c (trans_code): Ditto.

From-SVN: r218068
This commit is contained in:
Tobias Burnus 2014-11-25 23:37:54 +01:00 committed by Tobias Burnus
parent 4daa149b86
commit 17d5d49f58
12 changed files with 42 additions and 28 deletions

View File

@ -1,3 +1,21 @@
2014-11-25 Tobias Burnus <burnus@net-b.de>
* error.c (gfc_internal_error): Convert to common diagnostics.
* interface.c (gfc_find_sym_in_symtree): Use %qs.
* intrinsic.c (make_generic, gfc_check_intrinsic_standard,
gfc_convert_type_warn): Ditto.
* module.c (write_symbol): Ditto.
* symbol.c (gfc_get_default_type): Ditto; use fatal instead
of internal error.
* trans-array.c (gfc_walk_subexpr): Replace internal_error by
gfc_internal_error.
* trans-decl.c (gfc_get_symbol_decl,
(gfc_create_module_variable): Ditto. Use %qs.
* trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Ditto.
* trans-io.c (transfer_expr): Ditto.
* trans-openmp.c (gfc_trans_omp_workshare): Ditto.
* trans.c (trans_code): Ditto.
2014-11-25 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_option_t): Remove flags moved as Var to .opt.

View File

@ -1282,21 +1282,17 @@ gfc_error_now_1 (const char *gmsgid, ...)
/* This shouldn't happen... but sometimes does. */
void
gfc_internal_error (const char *format, ...)
gfc_internal_error (const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
buffer_flag = 0;
va_start (argp, format);
show_loci (&gfc_current_locus, NULL);
error_printf ("Internal Error at (1):");
error_print ("", format, argp);
va_start (argp, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &argp, UNKNOWN_LOCATION, DK_ICE);
report_diagnostic (&diagnostic);
va_end (argp);
exit (ICE_EXIT_CODE);
gcc_unreachable ();
}

View File

@ -3542,7 +3542,7 @@ gfc_find_sym_in_symtree (gfc_symbol *sym)
if (st)
return st;
}
gfc_internal_error ("Unable to find symbol %s", sym->name);
gfc_internal_error ("Unable to find symbol %qs", sym->name);
/* Not reached. */
}

View File

@ -1086,7 +1086,7 @@ make_generic (const char *name, gfc_isym_id id, int standard ATTRIBUTE_UNUSED)
g = gfc_find_function (name);
if (g == NULL)
gfc_internal_error ("make_generic(): Can't find generic symbol '%s'",
gfc_internal_error ("make_generic(): Can't find generic symbol %qs",
name);
gcc_assert (g->id == id);
@ -4307,7 +4307,7 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
break;
default:
gfc_internal_error ("Invalid standard code on intrinsic '%s' (%d)",
gfc_internal_error ("Invalid standard code on intrinsic %qs (%d)",
isym->name, isym->standard);
}
@ -4735,7 +4735,7 @@ bad:
return false;
}
gfc_internal_error ("Can't convert %s to %s at %L",
gfc_internal_error ("Can't convert %qs to %qs at %L",
gfc_typename (&from_ts), gfc_typename (ts),
&expr->where);
/* Not reached */

View File

@ -5496,7 +5496,7 @@ write_symbol (int n, gfc_symbol *sym)
const char *label;
if (sym->attr.flavor == FL_UNKNOWN || sym->attr.flavor == FL_LABEL)
gfc_internal_error ("write_symbol(): bad module symbol '%s'", sym->name);
gfc_internal_error ("write_symbol(): bad module symbol %qs", sym->name);
mio_integer (&n);

View File

@ -221,12 +221,12 @@ gfc_get_default_type (const char *name, gfc_namespace *ns)
letter = name[0];
if (gfc_option.flag_allow_leading_underscore && letter == '_')
gfc_internal_error ("Option -fallow-leading-underscore is for use only by "
"gfortran developers, and should not be used for "
"implicitly typed variables");
gfc_fatal_error ("Option %<-fallow-leading-underscore%> is for use only by "
"gfortran developers, and should not be used for "
"implicitly typed variables");
if (letter < 'a' || letter > 'z')
gfc_internal_error ("gfc_get_default_type(): Bad symbol '%s'", name);
gfc_internal_error ("gfc_get_default_type(): Bad symbol %qs", name);
if (ns == NULL)
ns = gfc_current_ns;

View File

@ -9093,7 +9093,7 @@ gfc_walk_subexpr (gfc_ss * ss, gfc_expr * expr)
break;
default:
internal_error ("bad expression type during walk (%d)",
gfc_internal_error ("bad expression type during walk (%d)",
expr->expr_type);
}
return ss;

View File

@ -1435,7 +1435,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
}
if (sym->attr.intrinsic)
internal_error ("intrinsic variable which isn't a procedure");
gfc_internal_error ("intrinsic variable which isn't a procedure");
/* Create string length decl first so that they can be used in the
type declaration. */
@ -4418,8 +4418,8 @@ gfc_create_module_variable (gfc_symbol * sym)
return;
if (sym->backend_decl && !sym->attr.vtab && !sym->attr.target)
internal_error ("backend decl for module variable %s already exists",
sym->name);
gfc_internal_error ("backend decl for module variable %qs already exists",
sym->name);
if (sym->module && !sym->attr.result && !sym->attr.dummy
&& (sym->attr.access == ACCESS_UNKNOWN

View File

@ -856,8 +856,8 @@ gfc_conv_intrinsic_lib_function (gfc_se * se, gfc_expr * expr)
if (m->id == GFC_ISYM_NONE)
{
internal_error ("Intrinsic function %s(%d) not recognized",
expr->value.function.name, id);
gfc_internal_error ("Intrinsic function %qs (%d) not recognized",
expr->value.function.name, id);
}
/* Get the decl and generate the call. */

View File

@ -2192,7 +2192,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
return;
default:
internal_error ("Bad IO basetype (%d)", ts->type);
gfc_internal_error ("Bad IO basetype (%d)", ts->type);
}
tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);

View File

@ -3933,7 +3933,7 @@ gfc_trans_omp_workshare (gfc_code *code, gfc_omp_clauses *clauses)
break;
default:
internal_error ("gfc_trans_omp_workshare(): Bad statement code");
gfc_internal_error ("gfc_trans_omp_workshare(): Bad statement code");
}
gfc_set_backend_locus (&code->loc);

View File

@ -1890,7 +1890,7 @@ trans_code (gfc_code * code, tree cond)
break;
default:
internal_error ("gfc_trans_code(): Bad statement code");
gfc_internal_error ("gfc_trans_code(): Bad statement code");
}
gfc_set_backend_locus (&code->loc);