diff options
author | Patrick Palka <ppalka@gcc.gnu.org> | 2016-01-16 02:30:14 +0000 |
---|---|---|
committer | Patrick Palka <ppalka@gcc.gnu.org> | 2016-01-16 02:30:14 +0000 |
commit | 203484bb27d092dde0f91bf50ce6bc541f1e5dfe (patch) | |
tree | f5d75ff6dd39696c86933b9753178c8ba2b7bb77 /gcc/cp/cp-array-notation.c | |
parent | aa2500e9bc6ce022c604fefb5f9c60d6fd7134f8 (diff) | |
download | gcc-203484bb27d092dde0f91bf50ce6bc541f1e5dfe.zip gcc-203484bb27d092dde0f91bf50ce6bc541f1e5dfe.tar.gz gcc-203484bb27d092dde0f91bf50ce6bc541f1e5dfe.tar.bz2 |
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.
From-SVN: r232462
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 f7a4598..4687ced6 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. */ |