Commit fce687f8 by Richard Kenner Committed by Richard Kenner

diagnostic.c (trim_filename): No longer static.

	* diagnostic.c (trim_filename): No longer static.
	* toplev.h (trim_filename): Declare.
	* rtl.c (rtl_check_failed_bounds): Call internal_error.
	(rtl_check_failed_type1, rtl_check_failed_type2): Likewise.
	(rtl_check_failed_code1, rtl_check_failed_code2): Likewise.
	(rtvec_check_failed_bounds): Likewise.
	* tree.c (tree_check_failed, tree_class_check_failed): Likewise.

From-SVN: r40016
parent 3cc247a8
Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* diagnostic.c (trim_filename): No longer static.
* toplev.h (trim_filename): Declare.
* rtl.c (rtl_check_failed_bounds): Call internal_error.
(rtl_check_failed_type1, rtl_check_failed_type2): Likewise.
(rtl_check_failed_code1, rtl_check_failed_code2): Likewise.
(rtvec_check_failed_bounds): Likewise.
* tree.c (tree_check_failed, tree_class_check_failed): Likewise.
* convert.c (convert_to_integer): Don't do unsigned unless result or * convert.c (convert_to_integer): Don't do unsigned unless result or
both inputs are unsigned. both inputs are unsigned.
......
...@@ -104,7 +104,6 @@ static void default_diagnostic_finalizer PARAMS ((output_buffer *, ...@@ -104,7 +104,6 @@ static void default_diagnostic_finalizer PARAMS ((output_buffer *,
diagnostic_context *)); diagnostic_context *));
static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN; static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN;
static const char *trim_filename PARAMS ((const char *));
extern int rtl_dump_and_exit; extern int rtl_dump_and_exit;
extern int inhibit_warnings; extern int inhibit_warnings;
...@@ -1716,7 +1715,7 @@ error_recursion () ...@@ -1716,7 +1715,7 @@ error_recursion ()
is used by fancy_abort() to print `Internal compiler error in expr.c' is used by fancy_abort() to print `Internal compiler error in expr.c'
instead of `Internal compiler error in ../../GCC/gcc/expr.c'. */ instead of `Internal compiler error in ../../GCC/gcc/expr.c'. */
static const char * const char *
trim_filename (name) trim_filename (name)
const char *name; const char *name;
{ {
......
...@@ -1285,9 +1285,10 @@ rtl_check_failed_bounds (r, n, file, line, func) ...@@ -1285,9 +1285,10 @@ rtl_check_failed_bounds (r, n, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: access of elt %d of `%s' with last elt %d", internal_error
n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r))-1); ("RTL check: access of elt %d of `%s' with last elt %d in %s, at %s:%d",
fancy_abort (file, line, func); n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r)) - 1,
func, trim_filename (file), line);
} }
void void
...@@ -1299,9 +1300,10 @@ rtl_check_failed_type1 (r, n, c1, file, line, func) ...@@ -1299,9 +1300,10 @@ rtl_check_failed_type1 (r, n, c1, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: expected elt %d type '%c', have '%c' (rtx %s)", internal_error
n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r))); ("RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d",
fancy_abort (file, line, func); n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)),
func, trim_filename (file), line);
} }
void void
...@@ -1314,10 +1316,10 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func) ...@@ -1314,10 +1316,10 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s)", internal_error
n, c1, c2, ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d",
GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE(r))); n, c1, c2, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)),
fancy_abort (file, line, func); func, trim_filename (file), line);
} }
void void
...@@ -1328,9 +1330,9 @@ rtl_check_failed_code1 (r, code, file, line, func) ...@@ -1328,9 +1330,9 @@ rtl_check_failed_code1 (r, code, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: expected code `%s', have `%s'", internal_error ("RTL check: expected code `%s', have `%s' in %s, at %s:%d",
GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r))); GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func,
fancy_abort (file, line, func); trim_filename (file), line);
} }
void void
...@@ -1341,10 +1343,10 @@ rtl_check_failed_code2 (r, code1, code2, file, line, func) ...@@ -1341,10 +1343,10 @@ rtl_check_failed_code2 (r, code1, code2, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: expected code `%s' or `%s', have `%s'", internal_error
GET_RTX_NAME (code1), GET_RTX_NAME (code2), ("RTL check: expected code `%s' or `%s', have `%s' in %s, at %s:%d",
GET_RTX_NAME (GET_CODE (r))); GET_RTX_NAME (code1), GET_RTX_NAME (code2), GET_RTX_NAME (GET_CODE (r)),
fancy_abort (file, line, func); ffunc, trim_filename (file), line);
} }
/* XXX Maybe print the vector? */ /* XXX Maybe print the vector? */
...@@ -1356,8 +1358,8 @@ rtvec_check_failed_bounds (r, n, file, line, func) ...@@ -1356,8 +1358,8 @@ rtvec_check_failed_bounds (r, n, file, line, func)
int line; int line;
const char *func; const char *func;
{ {
error ("RTL check: access of elt %d of vector with last elt %d", internal_error
n, GET_NUM_ELEM (r)-1); ("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d",
fancy_abort (file, line, func); n, GET_NUM_ELEM (r) - 1, func, trim_filename (file), line);
} }
#endif /* ENABLE_RTL_CHECKING */ #endif /* ENABLE_RTL_CHECKING */
...@@ -42,6 +42,7 @@ extern void debug_end_source_file PARAMS ((unsigned)); ...@@ -42,6 +42,7 @@ extern void debug_end_source_file PARAMS ((unsigned));
extern void debug_define PARAMS ((unsigned, const char *)); extern void debug_define PARAMS ((unsigned, const char *));
extern void debug_undef PARAMS ((unsigned, const char *)); extern void debug_undef PARAMS ((unsigned, const char *));
extern int debug_ignore_block PARAMS ((union tree_node *)); extern int debug_ignore_block PARAMS ((union tree_node *));
extern const char *trim_filename PARAMS ((const char *));
extern void internal_error PARAMS ((const char *, ...)) extern void internal_error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF_1
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
......
...@@ -4663,9 +4663,9 @@ tree_check_failed (node, code, file, line, function) ...@@ -4663,9 +4663,9 @@ tree_check_failed (node, code, file, line, function)
int line; int line;
const char *function; const char *function;
{ {
error ("Tree check: expected %s, have %s", internal_error ("Tree check: expected %s, have %s in %s, at %s:%d",
tree_code_name[code], tree_code_name[TREE_CODE (node)]); tree_code_name[code], tree_code_name[TREE_CODE (node)],
fancy_abort (file, line, function); function, trim_filename (file), line);
} }
/* Similar to above, except that we check for a class of tree /* Similar to above, except that we check for a class of tree
...@@ -4679,10 +4679,10 @@ tree_class_check_failed (node, cl, file, line, function) ...@@ -4679,10 +4679,10 @@ tree_class_check_failed (node, cl, file, line, function)
int line; int line;
const char *function; const char *function;
{ {
error ("Tree check: expected class '%c', have '%c' (%s)", internal_error
("Tree check: expected class '%c', have '%c' (%s) in %s, at %s:%d",
cl, TREE_CODE_CLASS (TREE_CODE (node)), cl, TREE_CODE_CLASS (TREE_CODE (node)),
tree_code_name[TREE_CODE (node)]); tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
fancy_abort (file, line, function);
} }
#endif /* ENABLE_TREE_CHECKING */ #endif /* ENABLE_TREE_CHECKING */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment