From 42ceec0607f3235904c68d3ede1aaddb70eb06aa Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 30 Oct 2019 12:58:03 +0100 Subject: 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 --- gcc/cp/tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/cp/tree.c') diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 9d63736a394..ca4d3e2a48b 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -43,7 +43,6 @@ static hashval_t list_hash_pieces (tree, tree, tree); static tree build_target_expr (tree, tree, tsubst_flags_t); static tree count_trees_r (tree *, int *, void *); static tree verify_stmt_tree_r (tree *, int *, void *); -static tree build_local_temp (tree); static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *); static tree handle_abi_tag_attribute (tree *, tree, tree, int, bool *); @@ -525,7 +524,7 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain) /* Return an undeclared local temporary of type TYPE for use in building a TARGET_EXPR. */ -static tree +tree build_local_temp (tree type) { tree slot = build_decl (input_location, -- cgit v1.2.1