As once reported in <http://news.gmane.org/find-root.php?message_id=%3C87r3j4lcrd.fsf%40kepler.schwinge.homeip.net%3E> and thereabouts, there is no execution (libgomp) testing of the Fortran OpenACC host_data construct, and the one test case present on gomp-4_0-branch, libgomp.oacc-fortran/host_data-1.f90, runs into an ICE (for trunk as well as gomp-4_0-branch). Please have a look at that, and also increase test coverage (for example, by translating C/C++ execution (libgomp) test cases, if applicable). As the implementation of OpenACC host_data/use_device has been completely re-done during patch review (to match OpenMP's use_device_ptr clause), I suppose it's possible that there is some middle end infrastructure missing to deal with constructs generated by the Fortran front end. Maybe Jakub can advise on that, in case he's already started implementing the Fortran support for OpenMP (which is currently missing). Or maybe the ICE is due to something completely different. ;-)
On trunk, for -m64, we have XFAIL/UNRESOLVED: ... XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 compilation failed to produce executa ble XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 compilation failed to produce executa ble XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 compilation failed to produce executa ble XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -fomit-frame-pointer -funroll-loops -f peel-loops -ftracer -finline-functions compilation failed to produce executable XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g compilation failed to produce exec utable XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os (internal compiler error) XFAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os (test for excess errors) UNRESOLVED: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os compilation failed to produce executa ble ... But for -m32, we have XPASS/FAIL: ... XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 execution test XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 execution test XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2 execution test XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g execution test XPASS: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os (test for excess errors) FAIL: libgomp.oacc-fortran/host_data-1.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -Os execution test ...
(In reply to vries from comment #1) > On trunk Sorry, that should have been gomp-4_0-branch
In <http://news.gmane.org/find-root.php?message_id=%3C2b4f59d5-be38-2814-27bb-73aa7ffb4b8f%40codesourcery.com%3E>, Chung-Lin has now posted a patch (pending review) that should make the OpenACC host_data construct usable in GCC Fortran. (Problem discussed in <http://news.gmane.org/find-root.php?message_id=%3C878u0o6wwj.fsf%40kepler.schwinge.homeip.net%3E> before.)
Author: cltang Date: Sun Aug 14 18:19:10 2016 New Revision: 239457 URL: https://gcc.gnu.org/viewcvs?rev=239457&root=gcc&view=rev Log: 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com> PR fortran/70598 gcc/fortran/ * openmp.c (resolve_omp_clauses): Adjust use_device clause handling to only allow pointers and arrays. gcc/testsuite/ * gfortran.dg/goacc/host_data-tree.f95: Adjust to use pointers in use_device clause. * gfortran.dg/goacc/uninit-use-device-clause.f95: Likewise. * gfortran.dg/goacc/list.f95: Adjust to catch "neither a POINTER nor an array" error messages. libgomp/ * testsuite/libgomp.oacc-fortran/host_data-1.f90: New test. Added: trunk/libgomp/testsuite/libgomp.oacc-fortran/host_data-1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/openmp.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95 trunk/gcc/testsuite/gfortran.dg/goacc/list.f95 trunk/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 trunk/libgomp/ChangeLog
GCC 6.3 is being released, adjusting target milestone.
GCC 6.4 is being released, adjusting target milestone.
Fixed.