diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-05-19 09:44:31 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-05-19 09:44:31 +0200 |
commit | 4577f7309a8b7c410e1ebe350250398997f0a8df (patch) | |
tree | 6ab10bfd313ec6b9af503559d01810292772524a /gcc/cp/semantics.c | |
parent | d1e5eb3ef68e87807a6046d8746cf262d42c7394 (diff) | |
download | gcc-4577f7309a8b7c410e1ebe350250398997f0a8df.zip gcc-4577f7309a8b7c410e1ebe350250398997f0a8df.tar.gz gcc-4577f7309a8b7c410e1ebe350250398997f0a8df.tar.bz2 |
re PR c++/48869 (OpenMP task construct fails to instantiate copy constructor(same as Bug 36523))
PR c++/48869
* method.c (get_dtor, get_copy_ctor): Add COMPLAIN argument,
pass it down to locate_fn_flags.
* cp-tree.h (get_dtor, get_copy_ctor): Adjust prototypes.
* semantics.c (cxx_omp_create_clause_info): Adjust callers.
* cp-gimplify.c: Include splay-tree.h.
(splay_tree_compare_decl_uid, omp_var_to_track,
omp_cxx_notice_variable): New functions.
(struct cp_genericize_omp_taskreg): New type.
(struct cp_genericize_data): Add omp_ctx field.
(cp_genericize_r): Attempt to determine implicitly determined
firstprivate class type variables.
(cp_genericize): Clear omp_ctx.
* Make-lang.in (cp/cp-gimplify.o): Depend on $(SPLAY_TREE_H).
* testsuite/libgomp.c++/pr48869.C: New test.
From-SVN: r173888
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 8d0cce1..6b62dd2c 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3756,7 +3756,7 @@ cxx_omp_create_clause_info (tree c, tree type, bool need_default_ctor, if (need_default_ctor) t = get_default_ctor (type); else - t = get_copy_ctor (type); + t = get_copy_ctor (type, tf_warning_or_error); if (t && !trivial_fn_p (t)) TREE_VEC_ELT (info, 0) = t; @@ -3764,7 +3764,7 @@ cxx_omp_create_clause_info (tree c, tree type, bool need_default_ctor, if ((need_default_ctor || need_copy_ctor) && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)) - TREE_VEC_ELT (info, 1) = get_dtor (type); + TREE_VEC_ELT (info, 1) = get_dtor (type, tf_warning_or_error); if (need_copy_assignment) { |