diff options
author | ppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-16 02:30:14 +0000 |
---|---|---|
committer | ppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-16 02:30:14 +0000 |
commit | bc24d01d1280c6272fa695044b72b46332c14f8c (patch) | |
tree | f5d75ff6dd39696c86933b9753178c8ba2b7bb77 /gcc/cp/cp-array-notation.c | |
parent | 4067c0fdb406d3d1230aeed3937242c5d66ad0df (diff) |
Fix logic bug in Cilk Plus array expansion
gcc/cp/ChangeLog:
* cp-array-notation.c (cp_expand_cond_array_notations): Return
error_mark_node only if find_rank failed, not if it was
successful.
gcc/testsuite/ChangeLog:
* c-c++-common/cilk-plus/AN/an-if.c: Check that the original
dump does not contain an error_mark_node.
* c-c++-common/cilk-plus/CK/pr60469.c: Likewise.
* c-c++-common/cilk-plus/AN/fn_ptr-2.c: New xfail'd test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-array-notation.c')
-rw-r--r-- | gcc/cp/cp-array-notation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c index f7a459857982..4687ced6729c 100644 --- a/gcc/cp/cp-array-notation.c +++ b/gcc/cp/cp-array-notation.c @@ -807,8 +807,8 @@ cp_expand_cond_array_notations (tree orig_stmt) if (!find_rank (EXPR_LOCATION (cond), cond, cond, true, &cond_rank) || !find_rank (EXPR_LOCATION (yes_expr), yes_expr, yes_expr, true, &yes_rank) - || find_rank (EXPR_LOCATION (no_expr), no_expr, no_expr, true, - &no_rank)) + || !find_rank (EXPR_LOCATION (no_expr), no_expr, no_expr, true, + &no_rank)) return error_mark_node; /* If the condition has a zero rank, then handle array notations in body separately. */ |