]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: declare variant's append_args + dispatch interop fixes
authorTobias Burnus <tburnus@baylibre.com>
Thu, 9 Jan 2025 00:36:49 +0000 (01:36 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 9 Jan 2025 00:36:49 +0000 (01:36 +0100)
commit1bb367b5cdb9fa77733d87d97483fb57480ef6fe
tree17f6d33470a8df3eccca7e4e72478f09265824ac
parent5f61fb4407fc1de6e359334ae5bbf31a65d38e96
OpenMP: declare variant's append_args + dispatch interop fixes

For 'omp dispatch interop(obj)', call omp_get_interop_int to
obtain the device number. Add new error if no device clause is
present if multiple interop-clause list items exist.

Update some vars and continue after appending interop args
instead of restarting to ensure that adjust_args updates
are actually performed.

gcc/ChangeLog:

* builtin-types.def (BT_FN_PTRMODE_PTR_INT_PTR): Add.
* gimplify.cc (gimplify_call_expr): Add error for multiple
list items to the OpenMP interop clause if no device clause;
continue instead of restarting after append_args handling.
(gimplify_omp_dispatch): Extract device number from the
single interop-clause list item.
* omp-builtins.def (BUILT_IN_OMP_GET_INTEROP_INT): Add.

gcc/fortran/ChangeLog:

* types.def (BT_FN_PTRMODE_PTR_INT_PTR): Add.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/append-args-1.c: Update dg-*.
* c-c++-common/gomp/append-args-3.c: Extend testcase.
* c-c++-common/gomp/dispatch-11.c: Update dg-*.
* c-c++-common/gomp/dispatch-12.c: Update dg-*.
* g++.dg/gomp/append-args-1.C: Update dg-*.
gcc/builtin-types.def
gcc/fortran/types.def
gcc/gimplify.cc
gcc/omp-builtins.def
gcc/testsuite/c-c++-common/gomp/append-args-1.c
gcc/testsuite/c-c++-common/gomp/append-args-3.c
gcc/testsuite/c-c++-common/gomp/dispatch-11.c
gcc/testsuite/c-c++-common/gomp/dispatch-12.c
gcc/testsuite/g++.dg/gomp/append-args-1.C