diff options
Diffstat (limited to 'gcc/c-family/array-notation-common.c')
-rw-r--r-- | gcc/c-family/array-notation-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-family/array-notation-common.c b/gcc/c-family/array-notation-common.c index f8bce04..cb5708c 100644 --- a/gcc/c-family/array-notation-common.c +++ b/gcc/c-family/array-notation-common.c @@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see bool is_sec_implicit_index_fn (tree fndecl) { + if (!fndecl) + return false; + if (TREE_CODE (fndecl) == ADDR_EXPR) fndecl = TREE_OPERAND (fndecl, 0); @@ -327,6 +330,9 @@ extract_array_notation_exprs (tree node, bool ignore_builtin_fn, vec<tree, va_gc> **array_list) { size_t ii = 0; + + if (!node) + return; if (TREE_CODE (node) == ARRAY_NOTATION_REF) { vec_safe_push (*array_list, node); |