diff options
author | Igor Zamyatin <igor.zamyatin@intel.com> | 2014-08-01 16:54:27 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2014-08-01 16:54:27 +0000 |
commit | a7ee52fba0727d98eadb8b6b9adbf42cf88c0914 (patch) | |
tree | 6b22b92b1cb7eb59e88beb1c6e546153ce181301 /gcc/c-family/array-notation-common.c | |
parent | 663683746c390061ab8610b8dd848faa77f7e20a (diff) | |
download | gcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.zip gcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.tar.gz gcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.tar.bz2 |
re PR c++/61455 (Internal compiler error, and other confused errors, when using array notation)
PR middle-end/61455
gcc/c-family/
* array-notation-common.c (extract_array_notation_exprs): Handling
of DECL_EXPR added.
gcc/c/
* c-array-notation.c (expand_array_notations): Handling
of DECL_EXPR added.
gcc/cp/
* cp-array-notation.c (expand_array_notation_exprs): Handling of
DECL_EXPR improved. Changed handling for INIT_EXPR.
gcc/testsuite/
* c-c++-common/cilk-plus/AN/pr61455.c: New test.
* c-c++-common/cilk-plus/AN/pr61455-2.c: Likewise.
From-SVN: r213491
Diffstat (limited to 'gcc/c-family/array-notation-common.c')
-rw-r--r-- | gcc/c-family/array-notation-common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-family/array-notation-common.c b/gcc/c-family/array-notation-common.c index c010039..84f6f45 100644 --- a/gcc/c-family/array-notation-common.c +++ b/gcc/c-family/array-notation-common.c @@ -329,6 +329,14 @@ extract_array_notation_exprs (tree node, bool ignore_builtin_fn, vec_safe_push (*array_list, node); return; } + if (TREE_CODE (node) == DECL_EXPR) + { + tree x = DECL_EXPR_DECL (node); + if (DECL_INITIAL (x)) + extract_array_notation_exprs (DECL_INITIAL (x), + ignore_builtin_fn, + array_list); + } else if (TREE_CODE (node) == STATEMENT_LIST) { tree_stmt_iterator ii_tsi; |