aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2006-01-14 08:15:59 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2006-01-14 08:15:59 +0000
commitdd5827cb6ffcd1991ac139a1df62ccf4421a3aef (patch)
tree17c9dc2ef96d5fc56b7b2b3d989e5a93eeaa38b7 /gcc/tree.c
parentce99549f58527066c820d5a8c26983a2db9ee925 (diff)
downloadgcc-dd5827cb6ffcd1991ac139a1df62ccf4421a3aef.zip
gcc-dd5827cb6ffcd1991ac139a1df62ccf4421a3aef.tar.gz
gcc-dd5827cb6ffcd1991ac139a1df62ccf4421a3aef.tar.bz2
tree.c (tree_not_class_check_failed): New function.
* tree.c (tree_not_class_check_failed): New function. * tree.h (NON_TYPE_CHECK): Call tree_not_class_check_failed. (tree_not_class_check_failed): Declare. From-SVN: r109699
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 574e73b..4bda846 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6012,6 +6012,21 @@ tree_class_check_failed (const tree node, const enum tree_code_class cl,
TREE_CODE_CLASS_STRING (TREE_CODE_CLASS (TREE_CODE (node))),
tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
}
+
+/* Similar to tree_check_failed, except that we check that a tree does
+ not have the specified code, given in CL. */
+
+void
+tree_not_class_check_failed (const tree node, const enum tree_code_class cl,
+ const char *file, int line, const char *function)
+{
+ internal_error
+ ("tree check: did not expect class %qs, have %qs (%s) in %s, at %s:%d",
+ TREE_CODE_CLASS_STRING (cl),
+ TREE_CODE_CLASS_STRING (TREE_CODE_CLASS (TREE_CODE (node))),
+ tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
+}
+
#undef DEFTREESTRUCT
#define DEFTREESTRUCT(VAL, NAME) NAME,