mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 12:21:15 +08:00
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
This commit is contained in:
parent
3cc247a81a
commit
fce687f876
@ -1,5 +1,13 @@
|
||||
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
|
||||
both inputs are unsigned.
|
||||
|
||||
|
@ -104,7 +104,6 @@ static void default_diagnostic_finalizer PARAMS ((output_buffer *,
|
||||
diagnostic_context *));
|
||||
|
||||
static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN;
|
||||
static const char *trim_filename PARAMS ((const char *));
|
||||
|
||||
extern int rtl_dump_and_exit;
|
||||
extern int inhibit_warnings;
|
||||
@ -1716,7 +1715,7 @@ error_recursion ()
|
||||
is used by fancy_abort() to print `Internal compiler error in expr.c'
|
||||
instead of `Internal compiler error in ../../GCC/gcc/expr.c'. */
|
||||
|
||||
static const char *
|
||||
const char *
|
||||
trim_filename (name)
|
||||
const char *name;
|
||||
{
|
||||
|
42
gcc/rtl.c
42
gcc/rtl.c
@ -1285,9 +1285,10 @@ rtl_check_failed_bounds (r, n, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: access of elt %d of `%s' with last elt %d",
|
||||
n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r))-1);
|
||||
fancy_abort (file, line, func);
|
||||
internal_error
|
||||
("RTL check: access of elt %d of `%s' with last elt %d in %s, at %s:%d",
|
||||
n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r)) - 1,
|
||||
func, trim_filename (file), line);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1299,9 +1300,10 @@ rtl_check_failed_type1 (r, n, c1, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: expected elt %d type '%c', have '%c' (rtx %s)",
|
||||
n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)));
|
||||
fancy_abort (file, line, func);
|
||||
internal_error
|
||||
("RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d",
|
||||
n, c1, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)),
|
||||
func, trim_filename (file), line);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1314,10 +1316,10 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s)",
|
||||
n, c1, c2,
|
||||
GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE(r)));
|
||||
fancy_abort (file, line, func);
|
||||
internal_error
|
||||
("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d",
|
||||
n, c1, c2, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)),
|
||||
func, trim_filename (file), line);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1328,9 +1330,9 @@ rtl_check_failed_code1 (r, code, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: expected code `%s', have `%s'",
|
||||
GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)));
|
||||
fancy_abort (file, line, func);
|
||||
internal_error ("RTL check: expected code `%s', have `%s' in %s, at %s:%d",
|
||||
GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func,
|
||||
trim_filename (file), line);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1341,10 +1343,10 @@ rtl_check_failed_code2 (r, code1, code2, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: expected code `%s' or `%s', have `%s'",
|
||||
GET_RTX_NAME (code1), GET_RTX_NAME (code2),
|
||||
GET_RTX_NAME (GET_CODE (r)));
|
||||
fancy_abort (file, line, func);
|
||||
internal_error
|
||||
("RTL check: expected code `%s' or `%s', have `%s' in %s, at %s:%d",
|
||||
GET_RTX_NAME (code1), GET_RTX_NAME (code2), GET_RTX_NAME (GET_CODE (r)),
|
||||
ffunc, trim_filename (file), line);
|
||||
}
|
||||
|
||||
/* XXX Maybe print the vector? */
|
||||
@ -1356,8 +1358,8 @@ rtvec_check_failed_bounds (r, n, file, line, func)
|
||||
int line;
|
||||
const char *func;
|
||||
{
|
||||
error ("RTL check: access of elt %d of vector with last elt %d",
|
||||
n, GET_NUM_ELEM (r)-1);
|
||||
fancy_abort (file, line, func);
|
||||
internal_error
|
||||
("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d",
|
||||
n, GET_NUM_ELEM (r) - 1, func, trim_filename (file), line);
|
||||
}
|
||||
#endif /* ENABLE_RTL_CHECKING */
|
||||
|
@ -42,6 +42,7 @@ extern void debug_end_source_file PARAMS ((unsigned));
|
||||
extern void debug_define PARAMS ((unsigned, const char *));
|
||||
extern void debug_undef PARAMS ((unsigned, const char *));
|
||||
extern int debug_ignore_block PARAMS ((union tree_node *));
|
||||
extern const char *trim_filename PARAMS ((const char *));
|
||||
extern void internal_error PARAMS ((const char *, ...))
|
||||
ATTRIBUTE_PRINTF_1
|
||||
ATTRIBUTE_NORETURN;
|
||||
|
14
gcc/tree.c
14
gcc/tree.c
@ -4663,9 +4663,9 @@ tree_check_failed (node, code, file, line, function)
|
||||
int line;
|
||||
const char *function;
|
||||
{
|
||||
error ("Tree check: expected %s, have %s",
|
||||
tree_code_name[code], tree_code_name[TREE_CODE (node)]);
|
||||
fancy_abort (file, line, function);
|
||||
internal_error ("Tree check: expected %s, have %s in %s, at %s:%d",
|
||||
tree_code_name[code], tree_code_name[TREE_CODE (node)],
|
||||
function, trim_filename (file), line);
|
||||
}
|
||||
|
||||
/* 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)
|
||||
int line;
|
||||
const char *function;
|
||||
{
|
||||
error ("Tree check: expected class '%c', have '%c' (%s)",
|
||||
cl, TREE_CODE_CLASS (TREE_CODE (node)),
|
||||
tree_code_name[TREE_CODE (node)]);
|
||||
fancy_abort (file, line, function);
|
||||
internal_error
|
||||
("Tree check: expected class '%c', have '%c' (%s) in %s, at %s:%d",
|
||||
cl, TREE_CODE_CLASS (TREE_CODE (node)),
|
||||
tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
|
||||
}
|
||||
|
||||
#endif /* ENABLE_TREE_CHECKING */
|
||||
|
Loading…
x
Reference in New Issue
Block a user