diff options
author | Zack Weinberg <zack@codesourcery.com> | 2002-11-14 21:58:38 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-11-14 21:58:38 +0000 |
commit | fa7b533b7b995fce50516c78d0a9dcbcaa437124 (patch) | |
tree | 30bf88ca9d454be99af8fdef0fb816fd40bdf399 /gcc/tree.c | |
parent | 9fc910d1ea18fde1720eaa8277d4ce6158772426 (diff) | |
download | gcc-fa7b533b7b995fce50516c78d0a9dcbcaa437124.zip gcc-fa7b533b7b995fce50516c78d0a9dcbcaa437124.tar.gz gcc-fa7b533b7b995fce50516c78d0a9dcbcaa437124.tar.bz2 |
tree.c (tree_vec_elt_check_failed): New function.
* tree.c (tree_vec_elt_check_failed): New function.
* tree.h (TREE_VEC_ELT_CHECK): New checking macro.
(TREE_VEC_ELT): Use it.
* tree-inline.c (optimize_inline_calls): Don't copy a
zero-length vector.
cp:
* search.c (dfs_push_decls): Do not try to reorder elements
3..n of method_vec if method_vec has only two elements.
Reverse order of two tests to avoid accessing unallocated
memory.
From-SVN: r59114
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -4665,6 +4665,22 @@ tree_class_check_failed (node, cl, file, line, function) tree_code_name[TREE_CODE (node)], function, trim_filename (file), line); } +/* Similar to above, except that the check is for the bounds of a TREE_VEC's + (dynamically sized) vector. */ + +void +tree_vec_elt_check_failed (idx, len, file, line, function) + int idx; + int len; + const char *file; + int line; + const char *function; +{ + internal_error + ("tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d", + idx + 1, len, function, trim_filename (file), line); +} + #endif /* ENABLE_TREE_CHECKING */ /* For a new vector type node T, build the information necessary for |