Commit Graph

1362 Commits

Author SHA1 Message Date
GCC Administrator e3948473e9 Daily bump. 2021-04-23 00:16:25 +00:00
Richard Biener d42088e453 Avoid -latomic for amdgcn offloading
libatomic isn't built for amdgcn but reduction-16.c adds it
via -foffload=-latomic when offloading for nvptx is enabled.
The following avoids linker errors when offloading to amdgcn is enabled
as well.

2021-04-21  Richard Biener  <rguenther@suse.de>

libgomp/
	* testsuite/libgomp.c-c++-common/reduction-16.c: Use -latomic
	only on nvptx-none.
2021-04-22 08:29:11 +02:00
GCC Administrator c1ef0c9234 Daily bump. 2021-04-22 00:16:32 +00:00
Tobias Burnus 0c0bdcc60c libgomp.fortran/depobj-1.f90: Fix omp_depend_kind
libgomp/
	* testsuite/libgomp.fortran/depobj-1.f90: Use omp_lib's
	omp_depend_kind instead of defining it as 16.
2021-04-21 22:47:18 +02:00
Tobias Burnus 95dfc3ac7b libgomp/testsuite: Fix checks for dg-excess-errors
For the tests modified below, the effective target line has to be effective
when compiling for an offload target, except that variable-not-offloaded.c
would compile with unified-share memory and pr86416-*.c if long double/float128
is supported.
The previous check used a run-time device ability check. This new variant
now enables those dg- lines when _compiling_ for nvptx or gcn.

libgomp/ChangeLog:

	* testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
	New, based on check_effective_target_offload_target_nvptx.
	(check_effective_target_offload_target_nvptx): Call it.
	(check_effective_target_offload_target_amdgcn): New.
	* testsuite/libgomp.c-c++-common/function-not-offloaded.c:
	Require target offload_target_nvptx || offload_target_amdgcn.
	* testsuite/libgomp.c-c++-common/variable-not-offloaded.c: Likewise.
	* testsuite/libgomp.c/pr86416-1.c: Likewise.
	* testsuite/libgomp.c/pr86416-2.c: Likewise.
2021-04-21 20:07:19 +02:00
Tobias Burnus a61c4964cd Fortran/OpenMP: Add 'omp depobj' and 'depend(mutexinoutset:'
gcc/fortran/ChangeLog:

	* dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
	in the depend clause.
	(show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
	* gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
	(enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
	OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
	(gfc_omp_clauses): Add destroy, depobj_update and depobj.
	(enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
	* match.h (gfc_match_omp_depobj): Match 'omp depobj'.
	* openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
	to depend clause.
	(gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
	Handle 'omp depobj'.
	* parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
	Likewise.
	* resolve.c (gfc_resolve_code): Likewise.
	* st.c (gfc_free_statement): Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
	in the depend clause.
	(gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
	* trans.c (trans_code): Likewise.

libgomp/ChangeLog:

	* testsuite/libgomp.fortran/depobj-1.f90: New test.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/depobj-1.f90: New test.
	* gfortran.dg/gomp/depobj-2.f90: New test.
2021-04-21 10:59:18 +02:00
GCC Administrator 6e81e015d9 Daily bump. 2021-04-20 00:16:27 +00:00
Thomas Schwinge 3395dfc4da [OpenACC 'kernels'] '-fopenacc-kernels=[...]' -> '--param=openacc-kernels=[...]'
This configuration knob is temporary, and isn't really meant to be exposed to
users.

	gcc/
	* params.opt (-param=openacc-kernels=): Add.
	* omp-oacc-kernels-decompose.cc
	(pass_omp_oacc_kernels_decompose::gate): Use it.
	* doc/invoke.texi (-fopenacc-kernels=@var{mode}): Move...
	(--param): ... here, 'openacc-kernels'.
	gcc/c-family/
	* c.opt (fopenacc-kernels=): Remove.
	gcc/fortran/
	* lang.opt (fopenacc-kernels=): Remove.
	gcc/testsuite/
	* c-c++-common/goacc/if-clause-2.c: '-fopenacc-kernels=[...]' ->
	'--param=openacc-kernels=[...]'.
	* c-c++-common/goacc/kernels-decompose-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-2.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-ice-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
	* gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
	* gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-tree.f95: Likewise.
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose-ice-1.c:
	'-fopenacc-kernels=[...]' -> '--param=openacc-kernels=[...]'.
	* testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
	Likewise.
	* testsuite/libgomp.oacc-fortran/pr94358-1.f90: Likewise.
2021-04-19 14:29:48 +02:00
GCC Administrator ee351f7fdb Daily bump. 2021-04-16 00:16:23 +00:00
Thomas Schwinge 4dd9e1c541 XFAIL OpenMP/nvptx execution-time hangs for simple nested OpenMP 'target'/'parallel'/'task' constructs [PR99555]
... still awaiting proper resolution, of course.

	libgomp/
	PR target/99555
	* testsuite/lib/libgomp.exp
	(check_effective_target_offload_device_nvptx): New.
	* testsuite/libgomp.c/pr99555-1.c <nvptx offload device>: Until
	resolved, make sure that we exit quickly, with error status,
	XFAILed.
	* testsuite/libgomp.c-c++-common/task-detach-6.c: Likewise.
	* testsuite/libgomp.fortran/task-detach-6.f90: Likewise.
2021-04-15 11:13:27 +02:00
GCC Administrator df3b128952 Daily bump. 2021-04-15 00:16:47 +00:00
Jakub Jelinek 287be7f7a5 testsuite: Fix up libgomp.fortran/alloc-1.F90 testcase [PR100071]
As can be seen under valgrind, the testcase didn't bind in the last part
the fortran pointers properly to the c pointers.

2021-04-14  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/100071
	* testsuite/libgomp.fortran/alloc-1.F90: Call c_f_pointer after last
	cp = omp_alloc with cp, p arguments instead of cq, q and call
	c_f_pointer after last cq = omp_alloc with cq, q.
2021-04-14 10:48:56 +02:00
GCC Administrator a0ecde220d Daily bump. 2021-04-12 00:16:27 +00:00
Hafiz Abid Qadeer ac200799ac [OpenACC] Fix an ICE where a loop with GT condition is collapsed.
We have seen an ICE both on trunk and devel/omp/gcc-10 branches which can
be reprodued with this simple testcase.  It occurs if an OpenACC loop has
a collapse clause and any of the loop being collapsed uses GT or GE
condition.  This issue is specific to OpenACC.

int main (void)
{
  int ix, iy;
  int dim_x = 16, dim_y = 16;
  {
       for (iy = dim_y - 1; iy > 0; --iy)
       for (ix = dim_x - 1; ix > 0; --ix)
        ;
  }
}

The problem is caused by a failing assertion in expand_oacc_collapse_init.
It checks that cond_code for fd->loop should be same as cond_code for all
the loops that are being collapsed.  As the cond_code for fd->loop is
LT_EXPR with collapse clause (set at the end of omp_extract_for_data),
this assertion forces that all the loop in collapse clause should use
< operator.

There does not seem to be anything in the code which demands this
condition as loop with > condition works ok otherwise.  I digged old
mailing list a bit but could not find any discussion on this change.
Looking at the code, expand_oacc_for checks that fd->loop->cond_code is
either LT_EXPR or GT_EXPR.  I guess the original intention was to have
similar checks on the loop which are being collapsed. But the way check
was written does not acheive that.

I have fixed it by modifying the check in the assertion to be same as
check on fd->loop->cond_code.

I tested goacc and libgomp (with nvptx offloading) and did not see any
regression.  I have added new tests to check collapse with GT/GE condition.

	PR middle-end/98088
	gcc/
	* omp-expand.c (expand_oacc_collapse_init): Update condition in
	a gcc_assert.

	gcc/testsuite/
	* c-c++-common/goacc/collapse-2.c: New.

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Add check
	for loop with GT/GE condition.
	* testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
2021-04-11 14:44:22 +01:00
GCC Administrator 3115aba8d8 Daily bump. 2021-04-10 00:16:23 +00:00
Thomas Schwinge ffa0ae6eee Add 'libgomp.oacc-c-c++-common/static-variable-1.c' [PR84991, PR84992, PR90779]
libgomp/
	PR middle-end/84991
	PR middle-end/84992
	PR middle-end/90779
	* testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: New.
2021-04-09 17:28:32 +02:00
Jakub Jelinek 8cc863ca8f libgomp: Silence false positive -Wmaybe-uninitialized warning [PR99984]
pthread_setspecific second argument is const void *, so that one can
call it even with pointers to const, but the function only stores the
pointer and does nothing else, so the new assumption of -Wmaybe-uninitialized
that functions taking such pointers will read from what those pointers
will point to is wrong.  Maybe it would be useful to have some whitelist
of functions that surely don't do that.

Anyway, in this case it is easy to workaround the warning by moving the
pthread_setspecific call after the initialization without slowing anything
down.

2021-04-09  Jakub Jelinek  <jakub@redhat.com>

	PR libgomp/99984
	* team.c (gomp_thread_start): Call pthread_setspecific for
	!(defined HAVE_TLS || defined USE_EMUTLS) only after local_thr
	has been initialized to avoid false positive warning.
2021-04-09 10:18:47 +02:00
GCC Administrator 65374af219 Daily bump. 2021-03-30 00:16:29 +00:00
Tobias Burnus d579e2e76f libgomp: Fix on_device_arch.c aux-file handling [PR99555]
libgomp/ChangeLog:

	PR target/99555
	* testsuite/lib/on_device_arch.c: Move to ...
	* testsuite/libgomp.c-c++-common/on_device_arch.h: ... here.
	* testsuite/libgomp.fortran/on_device_arch.c: New file;
	#include on_device_arch.h.
	* testsuite/libgomp.c-c++-common/task-detach-6.c: #include
	on_device_arch.h instead of using dg-additional-source.
	* testsuite/libgomp.c/pr99555-1.c: Likewise.
	* testsuite/libgomp.fortran/task-detach-6.f90: Update to use
	on_device_arch.c without relative paths.
2021-03-29 10:40:38 +02:00
GCC Administrator 4493b1c1ad Daily bump. 2021-03-26 00:16:25 +00:00
Thomas Schwinge 7c1e856bed libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'
For unknown reasons, this had gotten added for the libgomp HSA plugin in commit
b8d89b03db (r242749) "Remove build dependence on
HSA run-time", and later propagated into the GCN plugin.

	libgomp/
	* plugin/plugin-gcn.c (init_environment_variables): Don't prepend
	the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'.
	* plugin/configfrag.ac (HSA_RUNTIME_LIB): Clean up.
	* config.h.in: Regenerate.
	* configure: Likewise.
2021-03-25 14:11:50 +01:00
Thomas Schwinge d99111fd8e Avoid OpenMP/nvptx execution-time hangs for simple nested OpenMP 'target'/'parallel'/'task' constructs [PR99555]
... awaiting proper resolution, of course.

	libgomp/
	PR target/99555
	* testsuite/lib/on_device_arch.c: New file.
	* testsuite/libgomp.c/pr99555-1.c: Likewise.
	* testsuite/libgomp.c-c++-common/task-detach-6.c: Until resolved,
	skip for nvptx offloading, with error status.
	* testsuite/libgomp.fortran/task-detach-6.f90: Likewise.
2021-03-25 13:00:11 +01:00
Thomas Schwinge 8bafce1be1 'libgomp.oacc-fortran/derivedtypes-arrays-1.f90' OpenACC 'serial' construct diagnostic for nvptx offloading
Fixup for recent commit d28f3da11d "openacc: Fix
lowering for derived-type mappings through array elements".  With nvptx
offloading we see the usual:

    [...]/libgomp.oacc-fortran/derivedtypes-arrays-1.f90: In function 'MAIN__._omp_fn.0':
    [...]/libgomp.oacc-fortran/derivedtypes-arrays-1.f90:90:40: warning: using vector_length (32), ignoring 1

	libgomp/
	* testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90:
	OpenACC 'serial' construct diagnostic for nvptx offloading.
2021-03-25 12:49:44 +01:00
GCC Administrator 3c5b6d24e6 Daily bump. 2021-03-16 10:55:35 +00:00
Tobias Burnus f20fe2cb21 OpenMP: Fix 'omp declare target' handling for vars [PR99509]
For variables with 'declare target' attribute,
varpool_node::get_create marks variables as offload; however,
if the node already exists, it is not updated. C/C++ may tag
decl with 'declare target implicit', which may only be after
varpool creation turned into 'declare target' or 'declare target link';
in this case, the tagging has to happen in the FE.

gcc/c/ChangeLog:

	PR c++/99509
	* c-decl.c (finish_decl): For 'omp declare target implicit' vars,
	ensure that the varpool node is marked as offloadable.

gcc/cp/ChangeLog:

	PR c++/99509
	* decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
	ensure that the varpool node is marked as offloadable.

libgomp/ChangeLog:

	PR c++/99509
	* testsuite/libgomp.c-c++-common/declare_target-1.c: New test.
2021-03-15 10:12:58 +01:00
GCC Administrator 6da2762a3b Daily bump. 2021-03-13 00:16:20 +00:00
Tobias Burnus 0b5437510c Fortran/OpenMP: Fix use_device_{ptr,addr} with assumed-size array [PR98858]
gcc/ChangeLog:

	PR fortran/98858
	* gimplify.c (omp_add_variable): Handle NULL_TREE as size
	occuring for assumed-size arrays in use_device_{ptr,addr}.

libgomp/ChangeLog:

	PR fortran/98858
	* testsuite/libgomp.fortran/use_device_ptr-3.f90: New test.
2021-03-12 16:33:02 +01:00
GCC Administrator 67f10d28f0 Daily bump. 2021-03-05 00:16:21 +00:00
Jakub Jelinek f65e551f73 libgomp: Use sizeof(void*) based checks instead of looking through $CC $CFLAGS for -m32/-mx32
Some gcc configurations default to -m32 but support -m64 too.  This patch
just makes the ILP32 tests more reliable by following what e.g. libsanitizer
configury does.

2021-03-04  Jakub Jelinek  <jakub@redhat.com>

	* configure.ac: Add AC_CHECK_SIZEOF([void *]).
	* plugin/configfrag.ac: Check $ac_cv_sizeof_void_p value instead of
	checking of -m32 or -mx32 options on the command line.
	* config.h.in: Regenerated.
	* configure: Regenerated.
2021-03-04 09:43:34 +01:00
GCC Administrator ec9dc4fa08 Daily bump. 2021-02-28 00:16:18 +00:00
Iain Sandoe e3eda9a0e1 libgomp, testsuite : Require alias support for PR96390 testcase.
This fails everywhere on Darwin, which does not have support for
symbol aliases.  Add a dg-require-alias to UNSUPPORT it.

libgomp/ChangeLog:

	* testsuite/libgomp.c-c++-common/pr96390.c: Require alias
	support from the target.
2021-02-27 16:31:34 +00:00
GCC Administrator daa6884432 Daily bump. 2021-02-26 00:16:36 +00:00
Kwok Cheung Yeung d656bfda2d openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]
This adds support for the task detach clause to taskwait and taskgroup, and
simplifies the handling of the detach clause by moving most of the extra
handling required for detach tasks to omp_fulfill_event.

2021-02-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>

	libgomp/

	PR libgomp/98738
	* libgomp.h (enum gomp_task_kind): Add GOMP_TASK_DETACHED.
	(struct gomp_task): Replace detach and completion_sem fields with
	union containing completion_sem and detach_team.  Add deferred_p
	field.
	(struct gomp_team): Remove task_detach_queue.
	* task.c: Include assert.h.
	(gomp_init_task): Initialize deferred_p and completion_sem fields.
	Rearrange initialization order of fields.
	(task_fulfilled_p): Delete.
	(GOMP_task): Use address of task as the event handle.  Remove
	initialization of detach field.  Initialize deferred_p field.
	Use automatic local for completion_sem.  Initialize detach_team field
	for deferred tasks.
	(gomp_barrier_handle_tasks): Remove handling of task_detach_queue.
	Set kind of suspended detach task to GOMP_TASK_DETACHED and
	decrement task_running_count.  Move finish_cancelled block out of
	else branch.  Relocate call to gomp_team_barrier_done.
	(GOMP_taskwait): Handle tasks with completion events that have not
	been fulfilled.
	(GOMP_taskgroup_end): Likewise.
	(omp_fulfill_event): Use address of task as event handle.  Post to
	completion_sem for undeferred tasks.  Clear detach_team if task
	has not finished.  For finished tasks, handle post-execution tasks,
	call gomp_team_barrier_wake if necessary, and free task.
	* team.c (gomp_new_team): Remove initialization of task_detach_queue.
	(free_team): Remove free of task_detach_queue.
	* testsuite/libgomp.c-c++-common/task-detach-1.c: Fix formatting.
	* testsuite/libgomp.c-c++-common/task-detach-2.c: Fix formatting.
	* testsuite/libgomp.c-c++-common/task-detach-3.c: Fix formatting.
	* testsuite/libgomp.c-c++-common/task-detach-4.c: Fix formatting.
	* testsuite/libgomp.c-c++-common/task-detach-5.c: Fix formatting.
	Change data-sharing of detach events on enclosing parallel to private.
	* testsuite/libgomp.c-c++-common/task-detach-6.c: Likewise.  Remove
	taskwait directive.
	* testsuite/libgomp.c-c++-common/task-detach-7.c: New.
	* testsuite/libgomp.c-c++-common/task-detach-8.c: New.
	* testsuite/libgomp.c-c++-common/task-detach-9.c: New.
	* testsuite/libgomp.c-c++-common/task-detach-10.c: New.
	* testsuite/libgomp.c-c++-common/task-detach-11.c: New.
	* testsuite/libgomp.fortran/task-detach-1.f90: Fix formatting.
	* testsuite/libgomp.fortran/task-detach-2.f90: Fix formatting.
	* testsuite/libgomp.fortran/task-detach-3.f90: Fix formatting.
	* testsuite/libgomp.fortran/task-detach-4.f90: Fix formatting.
	* testsuite/libgomp.fortran/task-detach-5.f90: Fix formatting.
	Change data-sharing of detach events on enclosing parallel to private.
	* testsuite/libgomp.fortran/task-detach-6.f90: Likewise.  Remove
	taskwait directive.
	* testsuite/libgomp.fortran/task-detach-7.f90: New.
	* testsuite/libgomp.fortran/task-detach-8.f90: New.
	* testsuite/libgomp.fortran/task-detach-9.f90: New.
	* testsuite/libgomp.fortran/task-detach-10.f90: New.
	* testsuite/libgomp.fortran/task-detach-11.f90: New.
2021-02-25 14:47:11 -08:00
GCC Administrator 2f5765cf25 Daily bump. 2021-02-23 00:16:34 +00:00
Tobias Burnus e9b34037cd Fortran/OpenMP: Fix optional dummy procedures [PR99171]
gcc/fortran/ChangeLog:

	PR fortran/99171
	* trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
	dummy procs as nonoptional as no special treatment is needed.

libgomp/ChangeLog:

	PR fortran/99171
	* testsuite/libgomp.fortran/dummy-procs-1.f90: New test.
2021-02-22 13:20:26 +01:00
GCC Administrator acc0ee5c07 Daily bump. 2021-02-18 00:16:29 +00:00
Julian Brown 366cf1127a openacc: Strided array sections and components of derived-type arrays
This patch disallows selecting components of array sections in update
directives for OpenACC, as specified in OpenACC 3.0, "2.14.4. Update
Directive":

  In Fortran, members of variables of derived type may appear, including
  a subarray of a member. Members of subarrays of derived type may
  not appear.

The diagnostic for attempting to use the same construct on other
directives has also been improved.

gcc/fortran/
	* openmp.c (resolve_omp_clauses): Disallow selecting components
	of arrays of derived type.

gcc/testsuite/
	* gfortran.dg/goacc/array-with-dt-2.f90: Remove expected errors.
	* gfortran.dg/goacc/array-with-dt-6.f90: New test.
	* gfortran.dg/goacc/mapping-tests-2.f90: Update expected error.
	* gfortran.dg/goacc/ref_inquiry.f90: Update expected errors.
	* gfortran.dg/gomp/ref_inquiry.f90: Likewise.

libgomp/
	* testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Remove
	expected errors.
2021-02-17 06:13:55 -08:00
Julian Brown d28f3da11d openacc: Fix lowering for derived-type mappings through array elements
This patch fixes lowering of derived-type mappings which select elements
of arrays of derived types, and similar. These would previously lead
to ICEs.

With this change, OpenACC directives can pass through constructs that
are no longer recognized by the gimplifier, hence alterations are needed
there also.

gcc/fortran/
	* trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
	for arrays of derived types.

gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Handle ATTACH_DETACH
	for non-decls.

gcc/testsuite/
	* gfortran.dg/goacc/array-with-dt-1.f90: New test.
	* gfortran.dg/goacc/array-with-dt-3.f90: Likewise.
	* gfortran.dg/goacc/array-with-dt-4.f90: Likewise.
	* gfortran.dg/goacc/array-with-dt-5.f90: Likewise.
	* gfortran.dg/goacc/derived-chartypes-1.f90: Re-enable test.
	* gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
	* gfortran.dg/goacc/derived-classtypes-1.f95: Uncomment
	previously-broken directives.

libgomp/
	* testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90: New test.
	* testsuite/libgomp.oacc-fortran/update-dt-array.f90: Likewise.
2021-02-17 06:13:55 -08:00
GCC Administrator 0c5cdb31bd Daily bump. 2021-02-12 00:16:25 +00:00
Uros Bizjak 5e40542f87 libgomp/i386: Revert the type of syscall wrappers output back to long.
Linux man-pages 5.07 wrongly declares syscall output type as int.  This error
was fixed in release 5.10, so this patch reverts my recent change.

2021-02-11  Uroš Bizjak  <ubizjak@gmail.com>

libgomp/
	* config/linux/x86/futex.h (__futex_wait):
	Revert output type back to long.
	(__futex_wake): Ditto.
	(futex_wait): Update for revert.
	(futex_wake): Ditto.
2021-02-12 00:07:56 +01:00
Uros Bizjak c36ad24e8a libgomp/i386: Move syscall asms to static inline wrapper.
Move syscall asms to static inline wrapper functions to improve #ifdeffery.
Also correct output type to int and timeout type to void *.

2021-02-11  Uroš Bizjak  <ubizjak@gmail.com>

libgomp/
	* config/linux/x86/futex.h (__futex_wait): New static inline
	wrapper function.  Correct output type to int and
	timeout type to void *.
	(__futex_wake): New static inline wrapper function.
	Correct output type to int.
	(futex_wait): Use __futex_wait.
	(futex_wake): Use __futex_wake.
2021-02-11 22:49:41 +01:00
GCC Administrator 4b37c3ea8a Daily bump. 2021-02-11 00:16:33 +00:00
Julian Brown f7fb2f662f openacc: Add XFAILs [PR98979]
This patch adds some XFAILs for PR98979 until the patch to fix them has
been approved. See:

  https://gcc.gnu.org/pipermail/gcc-patches/2021-February/564711.html

gcc/testsuite/
	PR fortran/98979
	* gfortran.dg/goacc/array-with-dt-2.f90: Add expected errors.
	* gfortran.dg/goacc/derived-chartypes-1.f90: Skip ICEing test.
	* gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.

libgomp/
	PR fortran/98979
	* testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Add expected
	errors.
2021-02-09 19:16:28 -08:00
GCC Administrator a19dd5e644 Daily bump. 2021-02-05 00:16:23 +00:00
Julian Brown 9a4d32f85c openacc: Allow strided arrays in update directives
OpenACC 3.0 ("2.14.4. Update Directive") states:

  Noncontiguous subarrays may appear. It is implementation-specific
  whether noncontiguous regions are updated by using one transfer for
  each contiguous subregion, or whether the non-contiguous data is
  packed, transferred once, and unpacked, or whether one or more larger
  subarrays (no larger than the smallest contiguous region that contains
  the specified subarray) are updated.

This patch relaxes some conditions in the Fortran front-end so that
strided accesses are permitted for update directives.

gcc/fortran/
	* openmp.c (resolve_omp_clauses): Omit OpenACC update in
	contiguity check and stride-specified error.

gcc/testsuite/
	* gfortran.dg/goacc/array-with-dt-2.f90: New test.

libgomp/
	* testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: New test.
2021-02-04 15:06:22 -08:00
GCC Administrator 9faaa80776 Daily bump. 2021-02-04 00:16:32 +00:00
Andrew Stubbs 3535402e20 amdgcn: Add gfx908 support
gcc/

	* config/gcn/gcn-opts.h (enum processor_type): Add PROCESSOR_GFX908.
	* config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): Add gfx908.
	(output_file_start): Add gfx908.
	* config/gcn/gcn.opt (gpu_type): Add gfx908.
	* config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add march=gfx908.
	(MULTILIB_DIRNAMES): Add gfx908.
	* config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): New define.
	(main): Recognize gfx908.
	* config/gcn/t-omp-device: Add gfx908.

libgomp/

	* plugin/plugin-gcn.c (EF_AMDGPU_MACH): Add
	EF_AMDGPU_MACH_AMDGCN_GFX908.
	(gcn_gfx908_s): New constant string.
	(isa_hsa_name): Add gfx908.
	(isa_code): Add gfx908.
2021-02-03 14:25:33 +00:00
GCC Administrator 161e4c0862 Daily bump. 2021-01-26 00:16:34 +00:00
Kwok Cheung Yeung 0194e2f02d libgomp: Add documentation for omp_fulfill_event runtime function
2021-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	libgomp/
	* libgomp.texi (omp_fulfill_event): New entry.
2021-01-25 09:58:51 -08:00
GCC Administrator b93d0e36c0 Daily bump. 2021-01-21 00:16:36 +00:00