diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-15 20:20:05 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-15 20:20:05 +0000 |
commit | 8315e35ef665a7a74226761fd9e763f5bcb58fa3 (patch) | |
tree | ff148e79ad93f10015a49d49432f9e198d7b746c /gcc/c-family/array-notation-common.c | |
parent | 9d9f24299482fdee98dfc0edaeabefbca2fa6368 (diff) | |
download | gcc-8315e35ef665a7a74226761fd9e763f5bcb58fa3.tar.gz |
PR middle-end/63884
c-family/
* array-notation-common.c (is_sec_implicit_index_fn): Return false
for NULL fndecl.
(extract_array_notation_exprs): Return for NULL node.
testsuite/
* c-c++-common/cilk-plus/AN/pr63884.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217612 138bc75d-0d04-0410-961f-82ee72b054a4
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 f8bce04bbc1..cb5708c27b2 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); |