https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66332

--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Author: tschwinge
Date: Wed Jul 15 11:55:00 2015
New Revision: 225822

URL: https://gcc.gnu.org/viewcvs?rev=225822&root=gcc&view=rev
Log:
[PR libgomp/65742, PR middle-end/66332] OpenACC acc_on_device fixes

Backport trunk r223801:

    PR libgomp/65742

    gcc/
    * builtins.c (expand_builtin_acc_on_device): Don't use open-coded
    sequence for !ACCEL_COMPILER.

    libgomp/
    * oacc-init.c (plugin/plugin-host.h): Include.
    (acc_on_device): Check whether we're in an offloaded region for
    host_nonshm
    plugin. Don't use __builtin_acc_on_device.
    * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set
    nonshm_exec flag in thread-local data.
    (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local
    data for host_nonshm plugin.
    (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data
    for host_nonshm plugin.
    * plugin/plugin-host.h: New.

Mark parameters with ATTRIBUTE_UNUSED

Backport trunk r223805:

        * builtins.c (expand_builtin_acc_on_device): Mark parameters
        with ATTRIBUTE_UNUSED.

[PR libgomp/65742, PR middle-end/66332] XFAIL acc_on_device compile-time
evaluation

The OpenACC 2.0a specification mandates differently, but we currently do get a
library call in the host code.

Backport trunk r224028:

        PR libgomp/65742
        PR middle-end/66332

        gcc/testsuite/
        * c-c++-common/goacc/acc_on_device-2.c: XFAIL for C, too.

Added:
    branches/gcc-5-branch/libgomp/plugin/plugin-host.h
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/builtins.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c
    branches/gcc-5-branch/libgomp/ChangeLog
    branches/gcc-5-branch/libgomp/oacc-init.c
    branches/gcc-5-branch/libgomp/plugin/plugin-host.c

Reply via email to