summaryrefslogtreecommitdiff
path: root/gcc/langhooks-def.h
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2019-10-11 09:17:49 +0000
committerTobias Burnus <burnus@gcc.gnu.org>2019-10-11 11:17:49 +0200
commit08c14aaaab2b01f1a31989a8d94bae312d87c8f7 (patch)
tree57787b2cb0e1cad4b4370339157e8b47155b5e12 /gcc/langhooks-def.h
parentb67e2ad80d3e080c5258ff64ddb6f40e8d783e0b (diff)
[OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errors
gcc/fortran/ * f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to gfc_omp_is_allocatable_or_ptr. * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT only if not passed by value. * trans-openmp.c (gfc_omp_is_allocatable_or_ptr): New. (gfc_trans_omp_clauses): For MAP, handle (present) optional arguments; for target update, handle allocatable/pointer scalars. * trans.h (gfc_omp_is_allocatable_or_ptr): Declare. gcc/ * langhooks-def.h (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Define. (LANG_HOOKS_DECLS): Add it. * langhooks.h (lang_hooks_for_decls): Add omp_is_allocatable_or_ptr; update comment for omp_is_optional_argument. * omp-general.c (omp_is_allocatable_or_ptr): New. * omp-general.h (omp_is_allocatable_or_ptr): Declare. * omp-low.c (scan_sharing_clauses, lower_omp_target): Handle Fortran's optional arguments and allocatable/pointer scalars with use_device_addr. libgomp/ * testsuite/libgomp.fortran/use_device_addr-1.f90: New. * testsuite/libgomp.fortran/use_device_addr-2.f90: New. From-SVN: r276875
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r--gcc/langhooks-def.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 55d5fe01495..c5dc83d1cc8 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -236,6 +236,7 @@ extern tree lhd_unit_size_without_reusable_padding (tree);
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl
#define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS NULL
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall
+#define LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR hook_bool_const_tree_false
#define LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT hook_bool_const_tree_false
#define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE hook_bool_const_tree_false
#define LANG_HOOKS_OMP_PREDETERMINED_SHARING lhd_omp_predetermined_sharing
@@ -262,6 +263,7 @@ extern tree lhd_unit_size_without_reusable_padding (tree);
LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \
LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS, \
LANG_HOOKS_DECL_OK_FOR_SIBCALL, \
+ LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR, \
LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT, \
LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, \
LANG_HOOKS_OMP_PREDETERMINED_SHARING, \