diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-09-18 09:47:25 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-09-18 09:47:25 +0200 |
commit | e5597f2ad55219092929dc12ea15e1edba06df18 (patch) | |
tree | db45e32b3dc999d431fae4e2bdbd0bed09573756 /gcc/tree-pretty-print.c | |
parent | d07c750cc6c866e77e0c7eafcd71466139882618 (diff) | |
download | gcc-e5597f2ad55219092929dc12ea15e1edba06df18.zip gcc-e5597f2ad55219092929dc12ea15e1edba06df18.tar.gz gcc-e5597f2ad55219092929dc12ea15e1edba06df18.tar.bz2 |
openmp: Allow private or firstprivate arguments to default clause even for C/C++
OpenMP 5.1 allows default(private) or default(firstprivate) even in C/C++,
but it behaves the same way as in Fortran only for variables not declared at
namespace or file scope. For the namespace/file scope variables it instead
behaves as default(none).
2021-09-18 Jakub Jelinek <jakub@redhat.com>
gcc/
* gimplify.c (omp_default_clause): For C/C++ default({,first}private),
if file/namespace scope variable doesn't have predetermined sharing,
treat it as if there was default(none).
gcc/c/
* c-parser.c (c_parser_omp_clause_default): Handle private and
firstprivate arguments, adjust diagnostics on unknown argument.
gcc/cp/
* parser.c (cp_parser_omp_clause_default): Handle private and
firstprivate arguments, adjust diagnostics on unknown argument.
* cp-gimplify.c (cxx_omp_finish_clause): Handle OMP_CLAUSE_PRIVATE.
gcc/testsuite/
* c-c++-common/gomp/default-2.c: New test.
* c-c++-common/gomp/default-3.c: New test.
* g++.dg/gomp/default-1.C: New test.
libgomp/
* testsuite/libgomp.c++/default-1.C: New test.
* testsuite/libgomp.c-c++-common/default-1.c: New test.
* libgomp.texi (OpenMP 5.1): Mark "private and firstprivate argument
to default clause in C and C++" as implemented.
Diffstat (limited to 'gcc/tree-pretty-print.c')
0 files changed, 0 insertions, 0 deletions