aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2014-08-01 17:20:02 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-08-01 17:20:02 +0000
commitffebf50f2f1654dea65d934fd9ad27408ea65434 (patch)
treeee0116a2ddd454cf8e349191dc8b2112fb838b87 /gcc/cp/parser.c
parenta7ee52fba0727d98eadb8b6b9adbf42cf88c0914 (diff)
downloadgcc-ffebf50f2f1654dea65d934fd9ad27408ea65434.zip
gcc-ffebf50f2f1654dea65d934fd9ad27408ea65434.tar.gz
gcc-ffebf50f2f1654dea65d934fd9ad27408ea65434.tar.bz2
re PR other/61963 (CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments.)
PR other/61963 gcc/cp/ * parser.c (cp_parser_array_notation): Added check for array_type. gcc/testsuite/ * c-c++-common/cilk-plus/AN/pr61963.c: New test. From-SVN: r213494
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 32c7a3f..be071a8 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -6376,7 +6376,7 @@ cp_parser_array_notation (location_t loc, cp_parser *parser, tree *init_index,
parser->colon_corrects_to_scope_p = saved_colon_corrects;
if (*init_index == error_mark_node || length_index == error_mark_node
- || stride == error_mark_node)
+ || stride == error_mark_node || array_type == error_mark_node)
{
if (cp_lexer_peek_token (parser->lexer)->type == CPP_CLOSE_SQUARE)
cp_lexer_consume_token (parser->lexer);