cp-tree.h (omp_declare_variant_finalize, [...]): Declare.
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 Oct 2019 11:58:03 +0000 (12:58 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 Oct 2019 11:58:03 +0000 (12:58 +0100)
commit42ceec0607f3235904c68d3ede1aaddb70eb06aa
tree313194a2ff9eb15d51d4ebe286f26d7fc0e7899b
parent96e05bf5aece312bb35736bf3b6bd59560b312a1
cp-tree.h (omp_declare_variant_finalize, [...]): Declare.

* cp-tree.h (omp_declare_variant_finalize, build_local_temp): Declare.
* decl.c: Include omp-general.h.
(declare_simd_adjust_this): Add forward declaration.
(omp_declare_variant_finalize_one, omp_declare_variant_finalize): New
function.
(cp_finish_decl, finish_function): Call omp_declare_variant_finalize.
* parser.c (cp_finish_omp_declare_variant): Adjust parsing of the
variant id-expression and propagate enough information to
omp_declare_variant_finalize_one in the attribute so that it can
finalize it.
* class.c (finish_struct): Call omp_declare_variant_finalize.
* tree.c (build_local_temp): No longer static, remove forward
declaration.

* c-c++-common/gomp/declare-variant-2.c: Add a test with , before
match clause.
* c-c++-common/gomp/declare-variant-6.c: Expect diagnostics also from
C++ FE and adjust regexp so that it handles C++ pretty printing of
function names.
* g++.dg/gomp/declare-variant-1.C: New test.
* g++.dg/gomp/declare-variant-2.C: New test.
* g++.dg/gomp/declare-variant-3.C: New test.
* g++.dg/gomp/declare-variant-4.C: New test.
* g++.dg/gomp/declare-variant-5.C: New test.

From-SVN: r277613
14 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-variant-2.c
gcc/testsuite/c-c++-common/gomp/declare-variant-6.c
gcc/testsuite/g++.dg/gomp/declare-variant-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/declare-variant-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/declare-variant-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/declare-variant-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/declare-variant-5.C [new file with mode: 0644]