From 077b0dfbfe62790f11c2d173da10b80ed752f9d1 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 2 May 2006 12:44:55 +0200 Subject: re PR middle-end/27337 (OpenMP ICE in expand_expr_real_1 at expr.c:6814) PR middle-end/27337 * gimplify.c (gimplify_scan_omp_clauses): Handle INDIRECT_REF around RESULT_DECL for result passed by reference. (gimplify_expr): Call omp_notice_variable when RESULT_DECL is seen. * omp-low.c (use_pointer_for_field): Don't look at DECL_HAS_VALUE_EXPR_P for RESULT_DECLs. (scan_omp_1): Call remap_decl on RESULT_DECLs. (lower_rec_input_clauses): Don't allocate VLA memory for the second time or var for passing by reference for OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE clauses. Allow creation of TREE_ADDRESSABLE variables when passing by reference. * omp-low.c (dump_omp_region): Fix output formatting. cp/ * cp-gimplify.c (cxx_omp_privatize_by_reference): New function. * cp-tree.h (cxx_omp_privatize_by_reference): New prototype. * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define. testsuite/ * g++.dg/gomp/pr27337-1.C: New test. * g++.dg/gomp/pr27337-2.C: New test. libgomp/ * testsuite/libgomp.c++/pr27337.C: New test. From-SVN: r113456 --- gcc/cp/cp-objcp-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/cp/cp-objcp-common.h') diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index 96e6eb6..65eb6ae 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -161,5 +161,7 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op #undef LANG_HOOKS_OMP_CLAUSE_DTOR #define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor +#undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE +#define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference #endif /* GCC_CP_OBJCP_COMMON */ -- cgit v1.1