* gimplify.c (gimplify_scan_omp_clauses): Initialize sc
to NULL to avoid false positive warnings.
* omp-low.c (check_omp_nesting_restrictions): Diagnose
depend(source) or depend(sink:...) on #pragma omp target *.
(expand_omp_target): Pass flags and depend arguments to
GOMP_target_{41,update_41,enter_exit_data} libcalls.
(lower_depend_clauses): Change first argument from gimple
to tree * pointing to the stmt's clauses.
(lower_omp_taskreg): Adjust caller.
(lower_omp_target): Lower depend clauses. Always use 16-bit
kinds and 8 as align shift. Use
GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION for zero length array
section in map clause with delete kind.
* omp-builtins.def (BUILT_IN_GOMP_TARGET,
BUILT_IN_GOMP_TARGET_ENTER_EXIT_DATA): Add flags and depend arguments.
(BUILT_IN_GOMP_TARGET_UPDATE): Change library function name
to GOMP_target_update_41. Add flags and depend arguments,
remove unused argument.
* builtin-types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR): Remove.
(BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): New.
gcc/c/
* c-typeck.c (handle_omp_array_sections): Set
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION even for
GOMP_MAP_DELETE kinds.
gcc/cp/
* semantics.c (handle_omp_array_sections): Set
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION even for
GOMP_MAP_DELETE kinds.
gcc/fortran/
* types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR): Remove.
(BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): New.
include/
* gomp-constants.h (enum gomp_map_kind): Add
GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION.
(GOMP_TARGET_FLAG_NOWAIT, GOMP_TARGET_FLAG_EXIT_DATA): Define.
libgomp/
* libgomp_g.h (GOMP_target_41, GOMP_target_enter_exit_data): Add
flags and depend arguments.
(GOMP_target_update_41): New prototype.
* libgomp.h (gomp_task_maybe_wait_for_dependencies): New prototype.
* libgomp.map (GOMP_4.1): Add GOMP_target_update_41.
* task.c (gomp_task_maybe_wait_for_dependencies): Remove prototype.
No longer static.
* target.c (GOMP_target_41): Add flags and depend arguments. If
depend is non-NULL, wait until all dependencies are satisfied.
(GOMP_target_enter_exit_data): Likewise. Use
flags & GOMP_TARGET_FLAG_EXIT_DATA to determine if it is enter
or exit data construct, instead of analysing kinds.
(gomp_exit_data): Handle GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION.
(GOMP_target_update_41): New function.
* testsuite/libgomp.c/target-24.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_1-branch@227410 138bc75d-0d04-0410-961f-82ee72b054a4
20 files changed: