re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel for defaul...
authorJakub Jelinek <jakub@redhat.com>
Fri, 27 Sep 2019 20:14:24 +0000 (22:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 27 Sep 2019 20:14:24 +0000 (22:14 +0200)
commit59bc434a3327ce58f7afcd1e9209eeb2da714960
treec3c66425e42402e1f978eae510ebd6cb4a617da7
parent00798c58439037e3de959c3a003d6f4251eb93c6
re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel for default(none))

PR c++/88203
c-family/
* c-common.h (c_omp_predefined_variable): Declare.
* c-omp.c (c_omp_predefined_variable): New function.
(c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
for predefined variables.
c/
* c-parser.c (c_parser_predefined_identifier): New function.
(c_parser_postfix_expression): Use it.
(c_parser_omp_variable_list): Parse predefined identifiers.
* c-typeck.c (c_finish_omp_clauses): Allow predefined variables
in shared and firstprivate clauses, even when they are predetermined
shared.
cp/
* parser.c (cp_parser_omp_var_list_no_open): Parse predefined
variables.
* semantics.c (finish_omp_clauses): Allow predefined variables in
shared and firstprivate clauses, even when they are predetermined
shared.
* cp-gimplify.c (cxx_omp_predetermined_sharing_1): Return
OMP_CLAUSE_DEFAULT_SHARED for predefined variables.
testsuite/
* c-c++-common/gomp/pr88203-1.c: New test.
* c-c++-common/gomp/pr88203-2.c: New test.
* c-c++-common/gomp/pr88203-3.c: New test.

From-SVN: r276212
14 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-omp.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/pr88203-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/pr88203-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/pr88203-3.c [new file with mode: 0644]