[Bug c++/88203] assert does not compile with OpenMP's pragma omp parallel for default(none)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 21 11:45:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88203
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Oct 21 11:44:53 2019
New Revision: 277253
URL: https://gcc.gnu.org/viewcvs?rev=277253&root=gcc&view=rev
Log:
Backported from mainline
2019-09-27 Jakub Jelinek <jakub@redhat.com>
PR c++/88203
* 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-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.
* 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.
* 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.
Added:
branches/gcc-9-branch/gcc/testsuite/c-c++-common/gomp/pr88203-1.c
branches/gcc-9-branch/gcc/testsuite/c-c++-common/gomp/pr88203-2.c
branches/gcc-9-branch/gcc/testsuite/c-c++-common/gomp/pr88203-3.c
Modified:
branches/gcc-9-branch/gcc/c-family/ChangeLog
branches/gcc-9-branch/gcc/c-family/c-common.h
branches/gcc-9-branch/gcc/c-family/c-omp.c
branches/gcc-9-branch/gcc/c/ChangeLog
branches/gcc-9-branch/gcc/c/c-parser.c
branches/gcc-9-branch/gcc/c/c-typeck.c
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/cp-gimplify.c
branches/gcc-9-branch/gcc/cp/parser.c
branches/gcc-9-branch/gcc/cp/semantics.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list