2022-05-24 Andrew Stubbs * plugin/plugin-gcn.c (EF_AMDGPU_MACH): Add EF_AMDGPU_MACH_AMDGCN_GFX90a. (gcn_gfx90a_s): New. (isa_hsa_name): Support gfx90a. (isa_code): Likewise. 2022-04-13 Andrew Stubbs * testsuite/libgomp.c/alloc-pinned-1.c: Autodetect page size. * testsuite/libgomp.c/alloc-pinned-2.c: Likewise. * testsuite/libgomp.c/alloc-pinned-3.c: Likewise. * testsuite/libgomp.c/alloc-pinned-4.c: Likewise. * testsuite/libgomp.c/alloc-pinned-5.c: Likewise. * testsuite/libgomp.c/alloc-pinned-6.c: Likewise. * testsuite/libgomp.c/alloc-pinned-7.c: Clean up. 2022-04-02 Andrew Stubbs * testsuite/libgomp.c/usm-6.c: Add omp_target_alloc. 2022-03-31 Abid Qadeer * testsuite/libgomp.fortran/allocate-2.f90: Remove commented lines. Add deallocate. Remove omp_atk_pool_size trait. 2022-03-29 Andrew Stubbs * plugin/plugin-nvptx.c (GOMP_OFFLOAD_supported_features): Allow GOMP_REQUIRES_UNIFIED_ADDRESS and GOMP_REQUIRES_UNIFIED_SHARED_MEMORY. 2022-03-11 Andrew Stubbs Backport of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591354.html * config/linux/allocator.c (always_pinned_mode): New variable. (GOMP_enable_pinned_mode): New function. (linux_memspace_alloc): Disable pinning when always_pinned_mode set. (linux_memspace_calloc): Likewise. (linux_memspace_free): Likewise. (linux_memspace_realloc): Likewise. * libgomp.map (GOMP_5.1.1): New version space with GOMP_enable_pinned_mode. * testsuite/libgomp.c/alloc-pinned-7.c: New test. 2022-03-11 Abid Qadeer Backport of a patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591353.html * testsuite/libgomp.c/usm-6.c: New test. * testsuite/libgomp.c++/usm-1.C: Likewise. 2022-03-11 Andrew Stubbs Backport of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591352.html * allocator.c (omp_max_predefined_alloc): Update. (omp_aligned_alloc): Don't fallback ompx_host_mem_alloc. (omp_aligned_calloc): Likewise. (omp_realloc): Likewise. * config/linux/allocator.c (linux_memspace_alloc): Handle USM. (linux_memspace_calloc): Handle USM. (linux_memspace_free): Handle USM. (linux_memspace_realloc): Handle USM. * config/nvptx/allocator.c (nvptx_memspace_alloc): Reject ompx_host_mem_alloc. (nvptx_memspace_calloc): Likewise. (nvptx_memspace_realloc): Likewise. * libgomp-plugin.h (GOMP_OFFLOAD_usm_alloc): New prototype. (GOMP_OFFLOAD_usm_free): New prototype. (GOMP_OFFLOAD_is_usm_ptr): New prototype. * libgomp.h (gomp_usm_alloc): New prototype. (gomp_usm_free): New prototype. (gomp_is_usm_ptr): New prototype. (struct gomp_device_descr): Add USM functions. * omp.h.in (omp_memspace_handle_t): Add ompx_unified_shared_mem_space and ompx_host_mem_space. (omp_allocator_handle_t): Add ompx_unified_shared_mem_alloc and ompx_host_mem_alloc. * omp_lib.f90.in: Likewise. * plugin/plugin-nvptx.c (nvptx_alloc): Add "usm" parameter. Call cuMemAllocManaged as appropriate. (GOMP_OFFLOAD_alloc): Move internals to ... (GOMP_OFFLOAD_alloc_1): ... this, and add usm parameter. (GOMP_OFFLOAD_usm_alloc): New function. (GOMP_OFFLOAD_usm_free): New function. (GOMP_OFFLOAD_is_usm_ptr): New function. * target.c (gomp_map_vars_internal): Add USM support. (gomp_usm_alloc): New function. (gomp_usm_free): New function. (gomp_load_plugin_for_device): New function. * testsuite/libgomp.c/usm-1.c: New test. * testsuite/libgomp.c/usm-2.c: New test. * testsuite/libgomp.c/usm-3.c: New test. * testsuite/libgomp.c/usm-4.c: New test. * testsuite/libgomp.c/usm-5.c: New test. 2022-03-11 Andrew Stubbs Backport of a patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589355.html * allocator.c (MEMSPACE_VALIDATE): New macro. (omp_aligned_alloc): Use MEMSPACE_VALIDATE. (omp_aligned_calloc): Likewise. (omp_realloc): Likewise. * config/nvptx/allocator.c (nvptx_memspace_validate): New function. (MEMSPACE_VALIDATE): New macro. * testsuite/libgomp.c/allocators-4.c (main): Add access trait. * testsuite/libgomp.c/allocators-6.c (main): Add access trait. * testsuite/libgomp.c/allocators-7.c: New test. 2022-03-11 Andrew Stubbs Backport of a patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588951.html * allocator.c (omp_max_predefined_alloc): Update. (omp_aligned_alloc): Support ompx_pinned_mem_alloc. (omp_free): Likewise. (omp_aligned_calloc): Likewise. (omp_realloc): Likewise. * omp.h.in (omp_allocator_handle_t): Add ompx_pinned_mem_alloc. * omp_lib.f90.in: Add ompx_pinned_mem_alloc. * testsuite/libgomp.c/alloc-pinned-5.c: New test. * testsuite/libgomp.c/alloc-pinned-6.c: New test. * testsuite/libgomp.fortran/alloc-pinned-1.f90: New test. 2022-03-10 Andrew Stubbs Backport of a patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588360.html * allocator.c (MEMSPACE_ALLOC): Add PIN. (MEMSPACE_CALLOC): Add PIN. (MEMSPACE_REALLOC): Add PIN. (MEMSPACE_FREE): Add PIN. (xmlock): New function. (omp_init_allocator): Don't disallow the pinned trait. (omp_aligned_alloc): Add pinning to all MEMSPACE_* calls. (omp_aligned_calloc): Likewise. (omp_realloc): Likewise. (omp_free): Likewise. * config/linux/allocator.c: New file. * config/nvptx/allocator.c (MEMSPACE_ALLOC): Add PIN. (MEMSPACE_CALLOC): Add PIN. (MEMSPACE_REALLOC): Add PIN. (MEMSPACE_FREE): Add PIN. * testsuite/libgomp.c/alloc-pinned-1.c: New test. * testsuite/libgomp.c/alloc-pinned-2.c: New test. * testsuite/libgomp.c/alloc-pinned-3.c: New test. * testsuite/libgomp.c/alloc-pinned-4.c: New test. 2022-03-09 Abid Qadeer Backport of a patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588372.html * testsuite/libgomp.fortran/allocate-2.f90: New test. 2022-03-08 Abid Qadeer * testsuite/libgomp.fortran/allocate-1.f90: Remove pool_size trait. Test last index in w and v array. Remove redundant assignment to V(1). Move alignment checks at the end of parallel region. 2022-03-08 Abid Qadeer Backported from master: 2022-02-04 Tobias Burnus * testsuite/libgomp.fortran/allocate-1.f90: Remove spurious STOP of previous commit. 2022-03-08 Abid Qadeer Backported from master: 2022-02-04 Tobias Burnus * testsuite/libgomp.fortran/allocate-1.c (is_64bit_aligned): Renamed from is_64bit_aligned_. * testsuite/libgomp.fortran/allocate-1.f90: Fix interface decl and use it, more implicit none, remove unused argument. 2022-03-08 Abid Qadeer Backported from master: 2022-01-13 Hafiz Abid Qadeer * testsuite/libgomp.fortran/allocate-1.c: New test. * testsuite/libgomp.fortran/allocate-1.f90: New test. * libgomp.texi: Remove string that says that allocate clause support is for C/C++ only. 2022-02-27 Tobias Burnus Backported from master: 2021-02-15 Tobias Burnus * testsuite/libgomp.fortran/depend-4.f90: New test. 2022-02-27 Tobias Burnus Backported from master: 2022-01-04 Tobias Burnus * testsuite/libgomp.c-c++-common/target-45.c: Iterate over all devices. * testsuite/libgomp.fortran/target10.f90: Likewise. 2022-02-27 Tobias Burnus Backported from master: 2021-12-13 Tobias Burnus PR fortran/103576 * libgomp.texi (OpenMP 5.1): Set Fortran support for atomic to 'Y'. * testsuite/libgomp.fortran/atomic-19.f90: New test. 2022-02-27 Tobias Burnus Backported from master: 2021-12-04 Tobias Burnus * libgomp.texi (OpenMP 5.1): Update status. 2022-02-27 Tobias Burnus Backported from master: 2021-11-15 Tobias Burnus * testsuite/libgomp.fortran/thread-limit-1.f90: New test. 2022-02-27 Tobias Burnus Backported from master: 2021-11-15 Jakub Jelinek * task.c (gomp_create_target_task): Copy args array as well. * target.c (gomp_target_fallback): Add args argument. Set gomp_icv (true)->thread_limit_var if thread_limit is present. (GOMP_target): Adjust gomp_target_fallback caller. (GOMP_target_ext): Likewise. (gomp_target_task_fn): Likewise. * config/nvptx/team.c (gomp_nvptx_main): Set gomp_global_icv.thread_limit_var. * testsuite/libgomp.c-c++-common/thread-limit-1.c: New test.2022-01-25 Kwok Cheung Yeung 2022-02-27 Tobias Burnus Backported from master: 2021-11-12 Tobias Burnus * gfortran.dg/gomp/unexpected-end.f90: Update dg-error. * gfortran.dg/gomp/clauses-1.f90: New test. * gfortran.dg/gomp/nowait-2.f90: New test. * gfortran.dg/gomp/nowait-3.f90: New test. 2022-02-27 Tobias Burnus Backported from master: 2021-11-11 Tobias Burnus * testsuite/libgomp.fortran/teams-1.f90: New test. 2022-02-27 Tobias Burnus Backported from master: 2021-11-11 Jakub Jelinek * testsuite/libgomp.c-c++-common/teams-1.c: New test. 2022-02-27 Tobias Burnus Backported from master: 2021-10-30 Tobias Burnus PR middle-end/102972 * testsuite/libgomp.c-c++-common/icv-3.c: Nest API calls inside parallel construct. * testsuite/libgomp.c-c++-common/icv-4.c: Likewise. * testsuite/libgomp.c/target-3.c: Likewise. * testsuite/libgomp.c/target-5.c: Likewise. * testsuite/libgomp.c/target-6.c: Likewise. * testsuite/libgomp.c/target-teams-1.c: Likewise. * testsuite/libgomp.c/teams-1.c: Likewise. * testsuite/libgomp.c/thread-limit-2.c: Likewise. * testsuite/libgomp.c/thread-limit-3.c: Likewise. * testsuite/libgomp.c/thread-limit-4.c: Likewise. * testsuite/libgomp.c/thread-limit-5.c: Likewise. * testsuite/libgomp.fortran/icv-3.f90: Likewise. * testsuite/libgomp.fortran/icv-4.f90: Likewise. * testsuite/libgomp.fortran/teams1.f90: Likewise. 2022-01-28 Kwok Cheung Yeung * testsuite/libgomp.c-c++-common/metadirective-2.c (main): Add expected warning. * testsuite/libgomp.fortran/metadirective-2.f90 (test): Likewise. 2022-01-25 Kwok Cheung Yeung * Makefile.am (libgomp_la_SOURCES): Add selector.c. * Makefile.am: Regenerate. * config/gcn/selector.c: New. * config/linux/selector.c: New. * config/linux/x86/selector.c: New. * config/nvptx/selector.c: New. * libgomp-plugin.h (GOMP_OFFLOAD_evaluate_device): New. * libgomp.h (struct gomp_device_descr): Add evaluate_device_func field. * libgomp.map (GOMP_5.1): Add GOMP_evaluate_target_device. * libgomp_g.h (GOMP_evaluate_current_device): New. (GOMP_evaluate_target_device): New. * oacc-host.c (host_evaluate_device): New. (host_openacc_exec): Initialize evaluate_device_func field to host_evaluate_device. * plugin/plugin-gcn.c (GOMP_OFFLOAD_evaluate_device): New. * plugin/plugin-nvptx.c (struct ptx_device): Add compute_major and compute_minor fields. (nvptx_open_device): Read compute capability information from device. (CHECK_ISA): New macro. (GOMP_OFFLOAD_evaluate_device): New. * selector.c: New. * target.c (GOMP_evaluate_target_device): New. (gomp_load_plugin_for_device): Load evaulate_device plugin function. * testsuite/libgomp.c-c++-common/metadirective-5.c: New testcase. * testsuite/libgomp.fortran/metadirective-5.f90: New testcase. 2022-01-25 Kwok Cheung Yeung * testsuite/libgomp.c-c++-common/metadirective-1.c: New. * testsuite/libgomp.c-c++-common/metadirective-2.c: New. * testsuite/libgomp.c-c++-common/metadirective-3.c: New. * testsuite/libgomp.c-c++-common/metadirective-4.c: New. * testsuite/libgomp.fortran/metadirective-1.f90: New. * testsuite/libgomp.fortran/metadirective-2.f90: New. * testsuite/libgomp.fortran/metadirective-3.f90: New. * testsuite/libgomp.fortran/metadirective-4.f90: New. 2021-12-22 Andrew Stubbs Backport from master: * plugin/plugin-gcn.c (struct gcn_image_desc): Remove global_variables. (GOMP_OFFLOAD_load_image): Locate the offload variables via the table, not individual symbols. 2021-12-22 Andrew Stubbs * allocator.c (MEMSPACE_ALLOC): New macro. (MEMSPACE_CALLOC): New macro. (MEMSPACE_REALLOC): New macro. (MEMSPACE_FREE): New macro. (dynamic_smem_size): New constants. (omp_alloc): Use MEMSPACE_ALLOC. Implement fall-backs for predefined allocators. (omp_free): Use MEMSPACE_FREE. (omp_calloc): Use MEMSPACE_CALLOC. Implement fall-backs for predefined allocators. (omp_realloc): Use MEMSPACE_REALLOC. Implement fall-backs for predefined allocators. * config/nvptx/team.c (__nvptx_lowlat_heap_root): New variable. (__nvptx_lowlat_pool): New asm varaible. (gomp_nvptx_main): Initialize the low-latency heap. * plugin/plugin-nvptx.c (lowlat_pool_size): New variable. (GOMP_OFFLOAD_init_device): Read the GOMP_NVPTX_LOWLAT_POOL envvar. (GOMP_OFFLOAD_run): Apply lowlat_pool_size. * config/nvptx/allocator.c: New file. * testsuite/libgomp.c/allocators-1.c: New test. * testsuite/libgomp.c/allocators-2.c: New test. * testsuite/libgomp.c/allocators-3.c: New test. * testsuite/libgomp.c/allocators-4.c: New test. * testsuite/libgomp.c/allocators-5.c: New test. * testsuite/libgomp.c/allocators-6.c: New test. 2021-11-10 Tobias Burnus Backported from master: 2021-11-09 Thomas Schwinge * env.c (parse_gomp_openacc_dim): Restore parsing. 2021-10-27 Tobias Burnus Backported from master: 2021-10-27 Jakub Jelinek * libgomp.texi (OpenMP 5.0): Mention that Non-rectangular loop nests aren't implemented for Fortran yet. 2021-10-27 Tobias Burnus Backported from master: 2021-10-27 Jakub Jelinek * testsuite/libgomp.c/loop-26.c: New test. * testsuite/libgomp.c/loop-27.c: New test. 2021-10-21 Tobias Burnus * testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: Compile with -Wopenacc-parallelism. * testsuite/libgomp.oacc-fortran/declare-allocatable-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Likewise. 2021-10-20 Tobias Burnus Backported from master: 2021-10-20 Jakub Jelinek PR libgomp/102838 * libgomp.h (struct gomp_work_share_1st_cacheline): New type. (struct gomp_work_share): Only use aligned(64) attribute if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined, otherwise just add padding before lock to ensure lock is at offset 64 bytes into the structure. (gomp_workshare_struct_check1, gomp_workshare_struct_check2): New poor man's static assertions. * work.c (gomp_work_share_start): Use gomp_aligned_alloc instead of gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC. 2021-10-19 Tobias Burnus Backported from master: 2021-10-18 Jakub Jelinek * config/linux/affinity.c (gomp_affinity_init_numa_domains): Add && gomp_places_list_len < count after nfirst <= nlast loop condition. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * testsuite/libgomp.c/affinity-1.c (struct places): Change name field type from char [50] to const char *. (places_array): Add a testcase for simplified syntax place followed by length or length and stride. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * env.c (parse_one_place): Handle non-negative-number the same as { non-negative-number }. Reject even !number:1 and !number:1:stride or !place:1 or !place:1:stride instead of just length other than 1. * libgomp.texi (OpenMP 5.1): Document OMP_PLACES syntax extensions and OMP_NUM_TEAMS/OMP_TEAMS_THREAD_LIMIT and omp_{set_num,get_max}_teams/omp_{s,g}et_teams_thread_limit features as implemented. * testsuite/libgomp.c/affinity-1.c: Add a test for the 5.1 place simplified syntax. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * env.c (parse_schedule): For strtoul or strtoull calls which don't clearly reject return value 0 as invalid handle the case where end pointer is the same as first argument as invalid. (parse_unsigned_long_1): Likewise. (parse_one_place): Likewise. (parse_places_var): Likewise. (parse_stacksize): Likewise. (parse_spincount): Likewise. (parse_affinity): Likewise. (parse_gomp_openacc_dim): Likewise. Avoid strict aliasing violation. Make code valid C89. * config/linux/affinity.c (gomp_affinity_find_last_cache_level): For strtoul calls which don't clearly reject return value 0 as invalid handle the case where end pointer is the same as first argument as invalid. (gomp_affinity_init_level_1): Likewise. (gomp_affinity_init_numa_domains): Likewise. * config/rtems/proc.c (parse_thread_pools): Likewise. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * config/linux/affinity.c (gomp_affinity_init_level_1): For level 1 after creating count places clean up and return immediately. * testsuite/libgomp.c/places-6.c: New test. * testsuite/libgomp.c/places-7.c: New test. * testsuite/libgomp.c/places-8.c: New test. * testsuite/libgomp.c/places-9.c: New test. * testsuite/libgomp.c/places-10.c: New test. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * env.c (parse_places_var): Handle numa_domains as level 5. * config/linux/affinity.c (gomp_affinity_init_numa_domains): New function. (gomp_affinity_init_level): Use it instead of gomp_affinity_init_level_1 for level == 5. * testsuite/libgomp.c/places-5.c: New test. 2021-10-15 Tobias Burnus Backported from master: 2021-10-15 Jakub Jelinek * env.c (parse_places_var): Handle ll_caches as level 4. * config/linux/affinity.c (gomp_affinity_find_last_cache_level): New function. (gomp_affinity_init_level_1): Handle level 4 as logical cpus sharing last level cache. (gomp_affinity_init_level): Likewise. * testsuite/libgomp.c/places-1.c: New test. * testsuite/libgomp.c/places-2.c: New test. * testsuite/libgomp.c/places-3.c: New test. * testsuite/libgomp.c/places-4.c: New test. 2021-10-15 Tobias Burnus Backported from master: 2021-10-14 Kwok Cheung Yeung * libgomp.texi (OpenMP 5.0): Update entry for declare variant directive. 2021-10-15 Tobias Burnus Backported from master: 2021-10-14 Kwok Cheung Yeung * testsuite/libgomp.fortran/declare-variant-1.f90: New test. 2021-10-13 Tobias Burnus Backported from master: 2021-10-13 Tobias Burnus PR fortran/102086 PR fortran/92189 PR fortran/92621 PR fortran/101308 PR fortran/101309 PR fortran/101635 PR fortran/92482 * testsuite/libgomp.fortran/optional-bind-c.f90: New test. 2021-10-12 Julian Brown Revert: 2019-09-10 Chung-Lin Tang * plugin/plugin-nvptx.c (nvptx_exec): Adjust arguments, add kernel argument setup code, adjust cuLaunchKernel calling code. (GOMP_OFFLOAD_openacc_exec): Adjust nvptx_exec call, delete profiling code. (GOMP_OFFLOAD_openacc_async_exec): Likewise. (cuda_free_argmem): Delete function. 2021-10-12 Tobias Burnus Backported from master: 2021-10-12 Tobias Burnus * testsuite/libgomp.fortran/icv-3.f90: New. * testsuite/libgomp.fortran/icv-4.f90: New. 2021-10-12 Tobias Burnus Backported from master: 2021-10-12 Jakub Jelinek * libgomp.texi (omp_get_max_teams, omp_get_teams_thread_limit, omp_set_num_teams, omp_set_teams_thread_limit, OMP_NUM_TEAMS, OMP_TEAMS_THREAD_LIMIT): Document. 2021-10-12 Tobias Burnus Backported from master: 2021-10-12 Jakub Jelinek * libgomp.texi (omp_get_device_num): Move @node before omp_get_dynamic to avoid makeinfo warnings. 2021-10-12 Tobias Burnus Backported from master: 2021-10-12 Jakub Jelinek * testsuite/libgomp.c-c++-common/icv-3.c: New test. * testsuite/libgomp.c-c++-common/icv-4.c: New test. 2021-10-12 Tobias Burnus Backported from master: 2021-10-12 Jakub Jelinek PR libgomp/102628 PR libgomp/102668 * testsuite/libgomp.c-c++-common/alloc-9.c (main): Decrease allocation sizes from 420 to 320 and from 768 to 568. * testsuite/libgomp.fortran/alloc-11.f90: Likewise. * testsuite/libgomp.fortran/alloc-1.F90: Change expected alignment for cr from 16 to 4. 2021-10-11 Tobias Burnus Backported from master: 2021-10-11 Jakub Jelinek * omp.h.in (omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit, omp_get_teams_thread_limit): Declare. * omp_lib.f90.in (omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit, omp_get_teams_thread_limit): Declare. * omp_lib.h.in (omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit, omp_get_teams_thread_limit): Declare. * libgomp.h (gomp_nteams_var, gomp_teams_thread_limit_var): Declare. * libgomp.map (OMP_5.1): Export omp_get_max_teams{,_}, omp_get_teams_thread_limit{,_}, omp_set_num_teams{,_,_8_} and omp_set_teams_thread_limit{,_,_8_}. * icv.c (omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit, omp_get_teams_thread_limit): New functions. * env.c (gomp_nteams_var, gomp_teams_thread_limit_var): Define. (omp_display_env): Print OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT. (initialize_env): Handle OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT env vars. * teams.c (GOMP_teams_reg): If thread_limit is not specified, use gomp_teams_thread_limit_var as fallback if not zero. If num_teams is not specified, use gomp_nteams_var. * fortran.c (omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit, omp_get_teams_thread_limit): Add ialias_redirect. (omp_set_num_teams_, omp_set_num_teams_8_, omp_get_max_teams_, omp_set_teams_thread_limit_, omp_set_teams_thread_limit_8_, omp_get_teams_thread_limit_): New functions. 2021-10-09 Tobias Burnus Backported from master: 2021-10-09 Jakub Jelinek * libgomp.texi (OpenMP 5.1): Mention implemented support for structured block sequences in C/C++. Mention support for unconstrained/reproducible modifiers on order clause. Mention partial (C/C++ only) support of extentensions to atomics construct. Mention partial (C/C++ on clause only) support of align/allocator modifiers on allocate clause. 2021-10-04 Tobias Burnus Backported from master: 2021-10-04 Tobias Burnus * testsuite/libgomp.fortran/order-reproducible-1.f90: New test based on libgomp.c-c++-common/order-reproducible-1.c. * testsuite/libgomp.fortran/order-reproducible-2.f90: Likewise. * testsuite/libgomp.fortran/my-usleep.c: New test. 2021-10-02 Tobias Burnus Backported from master: 2021-10-02 Tobias Burnus * testsuite/libgomp.fortran/order-reproducible-1.f90: New test based on libgomp.c-c++-common/order-reproducible-1.c. * testsuite/libgomp.fortran/order-reproducible-2.f90: Likewise. * testsuite/libgomp.fortran/my-usleep.c: New test. 2021-10-01 Tobias Burnus Backported from master: 2021-10-01 Tobias Burnus * testsuite/libgomp.fortran/alloc-10.f90: Fix alignment check. * testsuite/libgomp.fortran/alloc-7.f90: Fix array access. * testsuite/libgomp.fortran/alloc-8.f90: Likewise. * testsuite/libgomp.fortran/alloc-11.f90: New test for omp_realloc, based on libgomp.c-c++-common/alloc-9.c. 2021-10-01 Tobias Burnus Backported from master: 2021-10-01 Jakub Jelinek * testsuite/libgomp.c-c++-common/order-reproducible-1.c: New test. * testsuite/libgomp.c-c++-common/order-reproducible-2.c: New test. 2021-10-01 Tobias Burnus Backported from master: 2021-10-01 Jakub Jelinek * affinity-fmt.c (omp_get_team_num, omp_get_num_teams): Add ialias_redirect. * env.c (handle_omp_display_env): Use ialias_call. * icv-device.c: Move ialias right below each function. (omp_get_device_num): Use ialias_call. * fortran.c (omp_fulfill_event): Add ialias_redirect. * icv.c (omp_get_active_level): Add ialias_redirect. 2021-10-01 Tobias Burnus Backported from master: 2021-10-01 Jakub Jelinek * omp.h.in (omp_aligned_alloc, omp_aligned_calloc): Add __alloc_align__ (1) attribute. * testsuite/libgomp.c-c++-common/alloc-9.c: New test. 2021-09-30 Tobias Burnus Backported from master: 2021-09-30 Tobias Burnus * testsuite/libgomp.fortran/alloc-7.f90: Add dg-prune-output for -fintrinsic-modules-path= warning of the C compiler. * testsuite/libgomp.fortran/alloc-9.f90: Likewise. * testsuite/libgomp.fortran/alloc-10.f90: Likewise. 2021-09-30 Tobias Burnus Backported from master: 2021-09-30 Tobias Burnus * libgomp.texi (OpenMP 5.1): Set implementation status to Y for omp_aligned_{,c}alloc and omp_{c,re}alloc routines. * omp_lib.f90.in (omp_aligned_alloc, omp_aligned_calloc, omp_calloc, omp_realloc): Add. * omp_lib.h.in (omp_aligned_alloc, omp_aligned_calloc, omp_calloc, omp_realloc): Add. * testsuite/libgomp.fortran/alloc-10.f90: New test. * testsuite/libgomp.fortran/alloc-6.f90: New test. * testsuite/libgomp.fortran/alloc-7.c: New test. * testsuite/libgomp.fortran/alloc-7.f90: New test. * testsuite/libgomp.fortran/alloc-8.f90: New test. * testsuite/libgomp.fortran/alloc-9.f90: New test. 2021-09-30 Tobias Burnus Backported from master: 2021-09-30 Jakub Jelinek * omp.h.in (omp_aligned_alloc, omp_calloc, omp_aligned_calloc, omp_realloc): New prototypes. (omp_alloc): Move after omp_free prototype, add __malloc__ (omp_free) attribute. * allocator.c: Include string.h. (omp_aligned_alloc): No longer static, add ialias. Add new_alignment variable and use it instead of alignment so that when retrying the old alignment is used again. Don't retry if new alignment is the same as old alignment, unless allocator had pool size. (omp_alloc, GOMP_alloc, GOMP_free): Use ialias_call. (omp_aligned_calloc, omp_calloc, omp_realloc): New functions. * libgomp.map (OMP_5.0.2): Export omp_aligned_alloc, omp_calloc, omp_aligned_calloc and omp_realloc. * testsuite/libgomp.c-c++-common/alloc-4.c (main): Add omp_aligned_alloc, omp_calloc and omp_aligned_calloc tests. * testsuite/libgomp.c-c++-common/alloc-5.c: New test. * testsuite/libgomp.c-c++-common/alloc-6.c: New test. * testsuite/libgomp.c-c++-common/alloc-7.c: New test. * testsuite/libgomp.c-c++-common/alloc-8.c: New test. 2021-09-27 Tobias Burnus Backported from master: 2021-09-27 Tobias Burnus PR fortran/94070 * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Update expected dg-note output. 2021-09-22 Tobias Burnus Backported from master: 2021-09-22 Tobias Burnus PR fortran/55534 * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Revert r12-3722 by removing -Wno-missing-include-dirs. * testsuite/libgomp.oacc-fortran/fortran.exp (ALWAYS_CFLAGS): Likewise. 2021-09-22 Tobias Burnus Backported from master: 2021-09-22 Jakub Jelinek * testsuite/libgomp.c-c++-common/allocate-2.c: New test. * testsuite/libgomp.c-c++-common/allocate-3.c: New test. 2021-09-21 Tobias Burnus Backported from master: 2021-09-21 Tobias Burnus PR fortran/55534 * testsuite/libgomp.fortran/fortran.exp: Add -Wno-missing-include-dirs to ALWAYS_CFLAGS. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. 2021-09-20 Tobias Burnus Backported from master: 2021-09-18 Jakub Jelinek * testsuite/libgomp.c++/default-1.C: New test. * testsuite/libgomp.c-c++-common/default-1.c: New test. * libgomp.texi (OpenMP 5.1): Mark "private and firstprivate argument to default clause in C and C++" as implemented. 2021-09-17 Tobias Burnus Backported from master: 2021-09-17 Jakub Jelinek * libgomp.texi (OpenMP 5.1): Spelling fix, declare variante -> declare variant. 2021-09-17 Tobias Burnus Backported from master: 2021-09-17 Jakub Jelinek * testsuite/libgomp.c-c++-common/atomic-19.c: Drop c effective target. Use /* */ comments instead of //. * testsuite/libgomp.c-c++-common/atomic-20.c: Likewise. * testsuite/libgomp.c-c++-common/atomic-21.c: Likewise. * testsuite/libgomp.c++/atomic-16.C: New test. * testsuite/libgomp.c++/atomic-17.C: New test. 2021-09-13 Tobias Burnus Backported from master: 2021-09-10 Jakub Jelinek * testsuite/libgomp.c-c++-common/atomic-19.c: New test. * testsuite/libgomp.c-c++-common/atomic-20.c: New test. * testsuite/libgomp.c-c++-common/atomic-21.c: New test. 2021-09-13 Tobias Burnus Backported from master: 2021-09-07 Tobias Burnus * libgomp.texi (OpenMP Implementation Status): Extend OpenMP 5.0 section. (OpenACC Profiling Interface): Fix typo. 2021-09-13 Tobias Burnus Backported from master: 2021-09-07 Tobias Burnus * libgomp.texi (Enabling OpenMP): Refer to OMP spec in general not to 4.5; link to new section. (OpenMP Implementation Status): New. 2021-09-06 Tobias Burnus Backported from master: 2021-09-06 Thomas Schwinge * testsuite/libgomp.c/target-43.c: '-latomic' for nvptx offloading. 2021-09-03 Tobias Burnus Backported from master: 2021-09-03 Tobias Burnus * testsuite/libgomp.c-c++-common/error-1.c: Use \r\n not \n\r in dg-output. * testsuite/libgomp.fortran/error-1.f90: Likewise. 2021-08-23 Tobias Burnus Backported from master: 2021-08-23 Tobias Burnus * testsuite/libgomp.fortran/taskloop-4-a.f90: New test. * testsuite/libgomp.fortran/taskloop-4.f90: New test. * testsuite/libgomp.fortran/taskloop-5-a.f90: New test. * testsuite/libgomp.fortran/taskloop-5.f90: New test. 2021-08-23 Tobias Burnus Backported from master: 2021-08-23 Jakub Jelinek * taskloop.c (GOMP_taskloop): Handle GOMP_TASK_FLAG_STRICT. * testsuite/libgomp.c-c++-common/taskloop-4.c (main): Fix up comment. * testsuite/libgomp.c-c++-common/taskloop-5.c: New test. 2021-08-23 Tobias Burnus Backported from master: 2021-07-20 Thomas Schwinge * config/nvptx/error.c (fwrite, exit): Override, too. * testsuite/libgomp.c-c++-common/error-1.c: Add a minimum amount of offloading testing. * testsuite/libgomp.fortran/error-1.f90: Likewise. 2021-08-20 Tobias Burnus Backported from master: 2021-08-20 Tobias Burnus * testsuite/libgomp.fortran/error-1.f90: New test. 2021-08-20 Tobias Burnus Backported from master: 2021-08-20 Jakub Jelinek * libgomp.map (GOMP_5.1): Add GOMP_error and GOMP_warning. * libgomp_g.h (GOMP_warning, GOMP_error): Declare. * error.c (GOMP_warning, GOMP_error): New functions. * testsuite/libgomp.c-c++-common/error-1.c: New test. 2021-08-18 Tobias Burnus Backported from master: 2021-08-18 Tobias Burnus * omp_lib.f90.in (omp_alloc, omp_free, omp_target_alloc, omp_target_free. omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect, omp_target_associate_ptr, omp_target_disassociate_ptr): Add interface. * omp_lib.h.in (omp_alloc, omp_free, omp_target_alloc, omp_target_free. omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect, omp_target_associate_ptr, omp_target_disassociate_ptr): Add interface. * testsuite/libgomp.fortran/alloc-1.F90: Remove local interface block for omp_alloc + omp_free. * testsuite/libgomp.fortran/alloc-4.f90: Likewise. * testsuite/libgomp.fortran/refcount-1.f90: New test. * testsuite/libgomp.fortran/target-12.f90: New test. 2021-08-18 Tobias Burnus Backported from master: 2021-08-18 Jakub Jelinek * testsuite/libgomp.c-c++-common/nothing-1.c: New test. 2021-08-17 Tobias Burnus Backported from master: 2021-08-17 Tobias Burnus * testsuite/libgomp.fortran/scope-1.f90: New test. * testsuite/libgomp.fortran/task-reduction-16.f90: New test. 2021-08-17 Tobias Burnus Backported from master: 2021-08-17 Jakub Jelinek * Makefile.am (libgomp_la_SOURCES): Add scope.c * Makefile.in: Regenerated. * libgomp_g.h (GOMP_scope_start): Declare. * libgomp.map: Add GOMP_scope_start@@GOMP_5.1. * scope.c: New file. * testsuite/libgomp.c-c++-common/scope-1.c: New test. * testsuite/libgomp.c-c++-common/task-reduction-16.c: New test. 2021-08-16 Tobias Burnus Backported from master: 2021-08-16 Tobias Burnus * testsuite/libgomp.fortran/masked-1.f90: New test. 2021-08-16 Tobias Burnus Backported from master: 2021-08-12 Jakub Jelinek * testsuite/libgomp.c-c++-common/masked-1.c: New test. 2021-08-16 Tobias Burnus Backported from master: 2021-08-12 Tobias Burnus * env.c (parse_bind_var): Accept 'primary' as alias for 'master'. (omp_display_env): Add TODO comment to change 'master' to 'primary' in proc_bind for OpenMP 5.1. * libgomp.texi: Change 'master thread' to 'primary thread' in line with OpenMP 5.1. (omp_get_proc_bind): Add omp_proc_bind_primary and note that omp_proc_bind_master is an alias of it. (OMP_PROC_BIND): Mention 'PRIMARY'. * omp.h.in (__GOMP_DEPRECATED_5_1): Define. (omp_proc_bind_primary): Add. (omp_proc_bind_master): Deprecate for OpenMP 5.1. * omp_lib.f90.in (omp_proc_bind_primary): Add. (omp_proc_bind_master): Deprecate for OpenMP 5.1. * omp_lib.h.in (omp_proc_bind_primary): Add. * testsuite/libgomp.c/affinity-1.c: Check that 'primary' works and is identical to 'master'. 2021-08-09 Tobias Burnus Backported from master: 2021-08-05 Chung-Lin Tang * icv-device.c (omp_get_device_num): New API function, host side. * fortran.c (omp_get_device_num_): New interface function. * libgomp-plugin.h (GOMP_DEVICE_NUM_VAR): Define macro symbol. * libgomp.map (OMP_5.0.2): New version space with omp_get_device_num, omp_get_device_num_. * libgomp.texi (omp_get_device_num): Add documentation for new API function. * omp.h.in (omp_get_device_num): Add declaration. * omp_lib.f90.in (omp_get_device_num): Likewise. * omp_lib.h.in (omp_get_device_num): Likewise. * target.c (gomp_load_image_to_device): If additional entry for device number exists at end of returned entries from 'load_image_func' hook, copy the assigned device number over to the device variable. * config/gcn/icv-device.c (GOMP_DEVICE_NUM_VAR): Define static global. (omp_get_device_num): New API function, device side. * plugin/plugin-gcn.c ("symcat.h"): Add include. (GOMP_OFFLOAD_load_image): Add addresses of device GOMP_DEVICE_NUM_VAR at end of returned 'target_table' entries. * config/nvptx/icv-device.c (GOMP_DEVICE_NUM_VAR): Define static global. (omp_get_device_num): New API function, device side. * plugin/plugin-nvptx.c ("symcat.h"): Add include. (GOMP_OFFLOAD_load_image): Add addresses of device GOMP_DEVICE_NUM_VAR at end of returned 'target_table' entries. * testsuite/lib/libgomp.exp (check_effective_target_offload_target_intelmic): New function for testing for intelmic offloading. * testsuite/libgomp.c-c++-common/target-45.c: New test. * testsuite/libgomp.fortran/target10.f90: New test. 2021-07-30 Tobias Burnus Backported from master: 2021-07-29 Thomas Schwinge Ulrich Drepper * fortran.c (omp_display_env_, omp_display_env_8_): Only '#ifndef LIBGOMP_OFFLOADED_ONLY'. 2021-07-30 Tobias Burnus Backported from master: 2021-07-29 Ulrich Drepper * env.c (wait_policy, stacksize): New static variables, move out of handle_omp_display_env. (omp_display_env): New function. The meat of the old handle_omp_display_env function. (handle_omp_display_env): Change to not take parameters and instead use the global variables. Only perform parsing, defer to omp_display_env for the implementation. (initialize_env): Remove local variables wait_policy and stacksize. Don't pass parameters to handle_omp_display_env. * fortran.c: Add ialias_redirect for omp_display_env. (omp_display_env_, omp_display_env_8_): New functions. * libgomp.map (OMP_5.1): New version. Add omp_display_env, omp_display_env_, and omp_display_env_8_. * omp.h.in: Declare omp_display_env. * omp_lib.f90.in: Likewise. * omp_lib.h.in: Likewise. 2021-06-29 Tobias Burnus Backported from master: 2021-06-29 Tobias Burnus PR other/67300 * testsuite/libgomp.c-c++-common/reduction-16.c: Replace -foffload=nvptx-none= by -foffload-options=nvptx-none= to avoid disabling other offload targets. * testsuite/libgomp.c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.c-c++-common/reduction-6.c: Likewise. * testsuite/libgomp.c/target-44.c: Likewise. 2021-06-29 Tobias Burnus Backported from master: 2021-06-29 Tobias Burnus * testsuite/libgomp.fortran/defaultmap-8.f90 (bar): Determine whether target has shared memory and disable some scalar pointer/allocatable checks if not as firstprivate does not work. 2021-06-23 Tobias Burnus Backported from master: 2021-06-23 Jakub Jelinek PR middle-end/101167 * testsuite/libgomp.c-c++-common/task-reduction-15.c: New test. 2021-06-15 Tobias Burnus Backported from master: 2021-06-15 Tobias Burnus PR fortran/92568 * testsuite/libgomp.fortran/defaultmap-8.f90: New test. 2021-05-28 Tobias Burnus Backported from master: 2021-05-28 Tobias Burnus * testsuite/libgomp.fortran/depend-iterator-2.f90: New test. 2021-05-28 Tobias Burnus Backported from master: 2021-05-27 Jakub Jelinek * testsuite/lib/libgomp.exp (check_effective_target_openacc_cuda, check_effective_target_openacc_cublas, check_effective_target_openacc_cudart): New. * testsuite/libgomp.oacc-fortran/host_data-4.f90: Require effective target openacc_cublas. * testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Require effective target openacc_cuda. * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pr87835.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Require effective targets openacc_cublas and openacc_cudart. * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c: Require effective target openacc_cudart. * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Add -DUSE_CUDA_H for effective target openacc_cuda and add && defined USE_CUDA_H to preprocessor conditionals. Guard -lcuda also on openacc_cuda effective target. 2021-05-26 Tobias Burnus Backported from master: 2021-05-26 Jakub Jelinek PR libgomp/100573 * config/nvptx/target.c (GOMP_target_ext, GOMP_target_data_ext, GOMP_target_end_data, GOMP_target_update_ext, GOMP_target_enter_exit_data): New dummy entrypoints. * config/gcn/target.c (GOMP_target_ext, GOMP_target_data_ext, GOMP_target_end_data, GOMP_target_update_ext, GOMP_target_enter_exit_data): Likewise. * testsuite/libgomp.c-c++-common/for-3.c (DO_PRAGMA, OMPTEAMS, OMPFROM, OMPTO): Define. (main): Remove #pragma omp target teams around all the tests. * testsuite/libgomp.c-c++-common/target-41.c: New test. * testsuite/libgomp.c-c++-common/target-42.c: New test. 2021-05-25 Tobias Burnus Backported from master: 2021-05-25 Jakub Jelinek PR middle-end/99928 * testsuite/libgomp.c-c++-common/reduction-17.c: New test. 2021-05-24 Tobias Burnus Backported from master: 2021-05-24 Tobias Burnus PR fortran/86470 * testsuite/libgomp.fortran/class-firstprivate-1.f90: New test. * testsuite/libgomp.fortran/class-firstprivate-2.f90: New test. * testsuite/libgomp.fortran/class-firstprivate-3.f90: New test. 2021-05-17 Kwok Cheung Yeung Backport from mainline 2021-05-17 Kwok Cheung Yeung * task.c (omp_fulfill_event): Call gomp_team_barrier_set_task_pending if new tasks generated. * testsuite/libgomp.c-c++-common/task-detach-13.c: New. 2021-05-17 Tobias Burnus Backported from master: 2021-05-14 Tobias Burnus * testsuite/libgomp.fortran/parallel-master.f90: New test. 2021-05-14 Tobias Burnus Backported from master: 2021-05-07 Tobias Burnus Tom de Vries * testsuite/libgomp.c-c++-common/reduction-5.c: New test, testing complex/floating-point || + && reduction with 'omp target'. * testsuite/libgomp.c-c++-common/reduction-6.c: Likewise. 2021-05-14 Tobias Burnus Backported from master: 2021-05-04 Tobias Burnus * testsuite/libgomp.c-c++-common/reduction-1.c: New test. * testsuite/libgomp.c-c++-common/reduction-2.c: New test. * testsuite/libgomp.c-c++-common/reduction-3.c: New test. 2021-05-14 Tobias Burnus Backported from master: 2021-05-03 Tom de Vries PR target/100321 * testsuite/libgomp.c/target-44.c: New test. 2021-05-14 Tobias Burnus Backported from master: 2021-04-29 Tom de Vries * testsuite/libgomp.c/pr81778.c: New test. 2021-05-05 Chung-Lin Tang * target.c (gomp_map_vars_existing): Add 'bool implicit' parameter, add implicit map handling to allow a "superset" existing map as valid case. (get_kind): Adjust to filter out GOMP_MAP_IMPLICIT bits in return value. (get_implicit): New function to extract implicit status. (gomp_map_fields_existing): Adjust arguments in calls to gomp_map_vars_existing, and add uses of get_implicit. (gomp_map_vars_internal): Likewise. * testsuite/libgomp.c-c++-common/target-implicit-map-1.c: New test. 2021-04-30 Kwok Cheung Yeung Backport from mainline 2021-04-26 Tobias Burnus * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Use [Ww]arning in dg-bogus as FE diagnostic and default diagnostic differ and the result depends on ENABLE_OFFLOAD. * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise. * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise. * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise. 2021-04-30 Kwok Cheung Yeung Backport from mainline 2021-04-26 Tobias Burnus * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Correct spelling in dg-bogus to match -Wopenacc-parallelism. * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise. * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise. * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise. 2021-04-30 Kwok Cheung Yeung Backport from mainline 2021-04-23 Thomas Schwinge * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Specify '-Wopenacc-parallelism', and match diagnostics, as appropriate. * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-variables.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Likewise. * testsuite/libgomp.oacc-fortran/optional-private.f90: Likewise. * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Likewise. * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise. * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise. * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise. * testsuite/libgomp.oacc-fortran/pr84028.f90: Likewise. * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise. 2021-04-30 Kwok Cheung Yeung Backport from mainline 2021-04-16 Thomas Schwinge * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Don't compile with '-w'. * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: Likewise. * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise. 2021-04-29 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Surpress warnings. * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Likewise. 2021-04-22 Kwok Cheung Yeung Backport from mainline 2021-04-21 Tobias Burnus * testsuite/libgomp.fortran/depobj-1.f90: Use omp_lib's omp_depend_kind instead of defining it as 16. 2021-04-22 Kwok Cheung Yeung Backport from mainline 2021-04-21 Tobias Burnus * testsuite/libgomp.fortran/depobj-1.f90: New test. 2021-04-07 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Update additional options and expected messages. 2021-03-25 Thomas Schwinge * target.c (__requires_mask_table, __requires_mask_table_end): Add '__attribute__((weak))'. 2021-03-01 Kwok Cheung Yeung * testsuite/libgomp.c-c++-common/collapse-4.c: New. * testsuite/libgomp.fortran/collapse5.f90: New. 2020-09-17 Kwok Cheung Yeung * testsuite/libgomp.oacc-fortran/privatized-ref-1.f95 (workers, vectors): Reduce number of workers to 16. 2020-09-16 Kwok Cheung Yeung * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: XFAIL on nvptx. 2020-09-16 Kwok Cheung Yeung * testsuite/libgomp.oacc-c++/privatized-ref-2.C (workers, vectors): Reduce number of workers to 16. * testsuite/libgomp.oacc-c++/privatized-ref-3.C (workers, vectors): Likewise. 2020-07-30 Julian Brown * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Fix for GCN num_workers > 1. 2020-07-16 Tobias Burnus * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: Use highest available integer kind instead of assuming that kind=16 exists. 2020-07-15 Julian Brown * testsuite/libgomp.oacc-c-c++-common/broadcast-many.c: New test. 2020-07-15 Julian Brown * testsuite/libgomp.oacc-fortran/collapse-1.f90: Fix race condition. * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise. 2020-06-02 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c (DoWorkVec): Replace openacc_amdgcn_accel_selected selector with openacc_radeon_accel_selected. 2020-05-21 Kwok Cheung Yeung * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c (aux_gang): Handle case where AMD GCN is used. (acc_worker): Likewise. (acc_vector): Likewise. 2020-05-21 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Change ACC_DEVICE_TYPE_gcn to ACC_DEVICE_TYPE_radeon. 2020-03-24 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/data-firstprivate-1.c: XFAIL execution test. 2020-03-16 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c (main): Add expected warnings. * testsuite/libgomp.oacc-fortran/parallel-dims.f90 (main): Likewise. 2020-03-05 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (main): Allow use of workers on AMD GCN. 2020-03-02 Kwok Cheung Yeung * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c (main): Add dg-warnings for expected compiler warnings. * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c (DoWorkVec): Likewise. * testsuite/libgomp.oacc-fortran/optional-private.f90 (t1, t2): Likewise. 2019-09-18 Tobias Burnus * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Fix dg-warning line numbers. 2019-09-17 Julian Brown Kwok Cheung Yeung * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_host2dev): Update prototype. * libgomp.h (gomp_copy_host2dev): Update prototype. * oacc-host.c (host_openacc_async_host2dev): Add ephemeral parameter. * oacc-mem.c (memcpy_tofrom_device): Update call to gomp_copy_host2dev. (update_dev_host): Likewise. * oacc-parallel.c (GOACC_enter_exit_data): Call async versions of acc_attach/acc_detach/acc_detach_finalize functions. * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Add ephemeral parameter. Copy source data to temporary space immediately if true, and pass to queue_push_copy. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_host2dev): Add EPHEMERAL parameter, and FIXME function comment. * target.c (goacc_device_copy_async): Remove. (gomp_copy_host2dev): Add ephemeral parameter. Update function comment. Call async host2dev plugin hook directly. (gomp_copy_dev2host): Call async dev2host plugin hook directly. (gomp_map_vars_existing, gomp_map_pointer, gomp_attach_pointer, gomp_detach_pointer): Update calls to gomp_copy_host2dev. (gomp_map_vars_internal): Don't use coalescing buffer for asynchronous copies. Update calls to gomp_copy_host2dev. (gomp_update): Update calls to gomp_copy_host2dev. * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c (main): Fix async-safety issue. Increase number of iterations. * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue. * testsuite/libgomp.oacc-fortran/lib-16-2.f90: Likewise. 2019-05-20 Julian Brown * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Expect "optimized:" not "note:" in warnings. 2021-04-07 Kwok Cheung Yeung * oacc-mem.c (goacc_enter_data_internal): Unlock mutex before calling gomp_acc_declare_allocate and relock it afterwards. 2018-10-04 Cesar Philippidis Julian Brown * libgomp.h (gomp_acc_declare_allocate): Remove prototype. * oacc-mem.c (gomp_acc_declare_allocate): New function. * oacc-parallel.c (goacc_enter_data_internal): Handle GOMP_MAP_DECLARE_ALLOCATE. Pass new pointer argument to gomp_acc_declare_allocate. (goacc_exit_data_internal): Handle GOMP_MAP_DECLARE_DEALLOCATE. Unlock device mutex around gomp_acc_declare_allocate call. Pass new pointer argument. Handle group pointer mapping for deallocate. (find_group_last): Handle GOMP_MAP_DECLARE_ALLOCATE and GOMP_MAP_DECLARE_DEALLOCATE groupings. * testsuite/libgomp.oacc-fortran/allocatable-scalar.f90: New test. * testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: New test. * testsuite/libgomp.oacc-fortran/declare-allocatable-2.f90: New test. * testsuite/libgomp.oacc-fortran/declare-allocatable-3.f90: New test. * testsuite/libgomp.oacc-fortran/declare-allocatable-4.f90: New test. 2019-10-16 Julian Brown * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Use oaccdevlow dump and update scanned output. * testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: Likewise. Add missing atomic to force worker partitioning for test variable. 2019-09-20 Julian Brown * testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: New test. * testsuite/libgomp.oacc-c++/privatized-ref-2.C: New test. * testsuite/libgomp.oacc-c++/privatized-ref-3.C: New test. 2019-09-17 Julian Brown * oacc-host.c (host_openacc_async_queue_callback): Invoke callback function immediately. * oacc-parallel.c (struct async_prof_callback_info, async_prof_dispatch, queue_async_prof_dispatch): New. (GOACC_parallel_keyed): Call queue_async_prof_dispatch for asynchronous profile-event dispatches. (GOACC_update): Likewise. * oacc-mem.c (GOACC_enter_exit_data): Call queue_async_prof_dispatch for asynchronous profile-event dispatches. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c (cb_compute_construct_start): Remove/fix TODO. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c (cb_exit_data_start): Tweak expected state values. (cb_exit_data_end): Likewise. (cb_compute_construct_start): Remove/fix TODO. (cb_compute_construct_end): Don't do adjustments for acc_ev_enqueue_launch_start/acc_ev_enqueue_launch_end callbacks. (cb_compute_construct_end): Tweak expected state values. (cb_enqueue_launch_start, cb_enqueue_launch_end): Don't expect launch-enqueue operations to happen synchronously with respect to profiling events on async streams. (main): Tweak expected state values. * testsuite/libgomp.oacc-c-c++-common/lib-94.c (main): Reorder operations for async-safety. 2019-09-17 Julian Brown * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip vector dimension test for AMD GCN. 2019-09-05 Julian Brown * plugin/plugin-gcn.c (gcn_exec): Change default number of workers to 16. 2019-09-05 Julian Brown * testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after wait API calls. 2019-08-08 Julian Brown * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_exec_params, GOMP_OFFLOAD_openacc_async_exec_params): New functions. 2019-07-31 Julian Brown * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer, gomp_print_double): New. 2019-01-23 Thomas Schwinge * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Update. 2018-12-20 Maciej W. Rozycki * oacc-init.c (get_property_any): Add profiling code. 2017-02-28 Thomas Schwinge * Makefile.am (libgomp_la_SOURCES): Add oacc-profiling-acc_register_library.c. * Makefile.in: Regenerate. * libgomp.texi: Remove paragraph about acc_register_library. * oacc-parallel.c (GOACC_parallel_keyed_internal): Set device_api for profiling. * oacc-profiling-acc_register_library.c: New file. * oacc-profiling.c (goacc_profiling_initialize): Call acc_register_library. Avoid duplicate registration. (acc_register_library): Remove. * config/nvptx/oacc-profiling-acc_register_library.c: New empty file. * config/nvptx/oacc-profiling.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: Remove call to acc_register_library. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c: Likewise. 2019-07-10 Cesar Philippidis * target.c (gomp_load_image_to_device): Allow the accelerator to possess more offloaded functions than the host. 2019-05-28 Julian Brown * testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: New test. 2019-05-16 Julian Brown * testsuite/libgomp.oacc-c-c++-common/kernels-for-index-reuse-1.c: New test. 2019-01-09 Julian Brown * libgomp.texi: Update mentions of OpenACC version to 2.6. Update section numbers to match version 2.6 of the spec. * openacc.f90 (openacc_version): Update to 201711. * openacc_lib.h (openacc_version): Update to 201711. * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update expected openacc_version to 201711. * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise. 2019-01-30 Thomas Schwinge * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c: Add "--param=openacc-kernels=parloops". * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95: Likewise. * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Likewise. 2019-09-10 Chung-Lin Tang * plugin/plugin-nvptx.c (nvptx_exec): Adjust arguments, add kernel argument setup code, adjust cuLaunchKernel calling code. (GOMP_OFFLOAD_openacc_exec): Adjust nvptx_exec call, delete profiling code. (GOMP_OFFLOAD_openacc_async_exec): Likewise. (cuda_free_argmem): Delete function. 2018-12-11 Julian Brown Chung-Lin Tang * testsuite/libgomp.oacc-c-c++-common/gang-private-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c: New test. * testsuite/libgomp.oacc-c/pr85465.c: New test. * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: New test.kk 2019-03-19 Julian Brown * testsuite/libgomp.oacc-c-c++-common/lib-93.c: Adjust target selector. 2018-09-05 Cesar Philippidis Chung-Lin Tang * testsuite/libgomp.oacc-c-c++-common/privatize-reduction-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/privatize-reduction-2.c: New test. 2018-09-20 Cesar Philippidis * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust test case to conform to the new behavior of the auto clause in OpenACC 2.5. 2018-12-22 Cesar Philippidis Julian Brown * oacc-parallel.c (GOACC_parallel_keyed): Handle GOMP_MAP_FIRSTPRIVATE_INT host addresses. * plugin/plugin-nvptx.c (nvptx_exec): Handle GOMP_MAP_FIRSTPRIVATE_INT host addresses. * testsuite/libgomp.oacc-c++/firstprivate-int.C: New test. * testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c: New test. * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: New test. 2018-08-28 Julian Brown Cesar Philippidis * testsuite/libgomp.oacc-c-c++-common/pr70828.c: New test. * testsuite/libgomp.oacc-fortran/implicit_copy.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828-2.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828-3.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828-4.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828-5.f90: New test. * testsuite/libgomp.oacc-fortran/pr70828-6.f90: New test. 2018-10-05 Nathan Sidwell Tom de Vries Thomas Schwinge Julian Brown * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Add -w. * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-warn-1.c: New. * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update. * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-variables.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise. * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Likewise. * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise. * testsuite/libgomp.oacc-fortran/pr84028.f90: Likewise. * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c: New. 2018-10-22 James Norris Cesar Philippidis Tom de Vries * testsuite/libgomp.oacc-c-c++-common/data-2.c: Update parallel regions to denote variables copyied in via acc enter data as present. * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/subr.h: Reimplement. * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Regenerated PTX. * testsuite/libgomp.oacc-c-c++-common/timer.h: Removed. * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Change async checks. * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Rework kernel i/f. * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Rework kernel i/f and change async checks. * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Rework kernel i/f and timing checks. * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-93.c: New test. 2018-12-13 Cesar Philippidis Nathan Sidwell Julian Brown * libgomp.oacc-c-c++-common/par-reduction-3.c: New test. * libgomp.oacc-c-c++-common/reduction-cplx-flt-2.c: New test. * libgomp.oacc-fortran/reduction-9.f90: New test. 2018-06-29 Cesar Philippidis James Norris * oacc-parallel.c (GOACC_parallel_keyed): Handle Fortran deviceptr clause. (GOACC_data_start): Likewise. * testsuite/libgomp.oacc-fortran/deviceptr-1.f90: New test. 2019-02-12 Julian Brown * oacc-cuda.c (acc_set_cuda_stream): Return 0 on error/invalid arguments. * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Handle unnumbered async stream being an alias for a numbered async stream. * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise. 2018-10-02 Thomas Schwinge Cesar Philippidis * testsuite/libgomp.oacc-c-c++-common/routine-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/routine-nohost-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/routine-bind-nohost-1.c: Update test. * testsuite/libgomp.oacc-fortran/routine-6.f90: Likewise. 2020-04-19 Chung-Lin Tang PR other/76739 * libgomp_g.h (GOACC_data_start): Add variadic '...' to declaration. * libgomp.h (gomp_map_vars_openacc): New function declaration. * oacc-int.h (struct goacc_ncarray_dim): New struct declaration. (struct goacc_ncarray_descr_type): Likewise. (struct goacc_ncarray): Likewise. (struct goacc_ncarray_info): Likewise. (goacc_noncontig_array_create_ptrblock): New function declaration. * oacc-parallel.c (goacc_noncontig_array_count_rows): New function. (goacc_noncontig_array_compute_sizes): Likewise. (goacc_noncontig_array_fill_rows_1): Likewise. (goacc_noncontig_array_fill_rows): Likewise. (goacc_process_noncontiguous_arrays): Likewise. (goacc_noncontig_array_create_ptrblock): Likewise. (GOACC_parallel_keyed): Use goacc_process_noncontiguous_arrays to handle non-contiguous array descriptors at end of varargs, adjust to use gomp_map_vars_openacc. (GOACC_data_start): Likewise. Adjust function type to accept varargs. * target.c (gomp_map_vars_internal): Add struct goacc_ncarray_info * nca_info parameter, add handling code for non-contiguous arrays. (gomp_map_vars_openacc): Add new function for specialization of gomp_map_vars_internal for OpenACC structured region usage. * testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/noncontig_array-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/noncontig_array-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/noncontig_array-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/noncontig_array-utils.h: Support header for new tests. 2018-11-28 Julian Brown Tobias Burnus * libgomp.h (RC_CHECKING): New macro, disabled by default, guarding all hunks in this patch. (target_mem_desc): Add forward declaration. (async_tgt_use): New struct. (target_mem_desc): Add refcount_chk, mark fields. (acc_dispatch_t): Add tgt_uses, au_lock fields. (dump_tgt, gomp_rc_check): Add prototypes. * oacc-async (goacc_async_unmap_tgt): Add refcount self-check code. (goacc_async_copyout_unmap_vars): Likewise. (goacc_remove_var_async): Likewise. * oacc-parallel.c (GOACC_parallel_keyed_internal): Add refcount self-check code. (GOACC_data_start, GOACC_data_end, GOACC_enter_exit_data): Likewise. * target.c (stdio.h): Include. (dump_tgt, rc_check_clear, rc_check_count, rc_check_verify) (gomp_rc_check): New functions to consistency-check reference counts. (gomp_target_init): Initialise self-check-related device fields.