]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Fix append_args handling in modify_call_for_omp_dispatch
authorTobias Burnus <tburnus@baylibre.com>
Tue, 8 Apr 2025 11:47:53 +0000 (13:47 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Tue, 8 Apr 2025 11:47:53 +0000 (13:47 +0200)
commit0f77d88fdf797842ac0134a4013b4227dd5a658f
tree956fe2507125a5d335dbb918c2233b7a604e84aa
parentd034c78c7be613db3c25fddec1dd50222327117b
OpenMP: Fix append_args handling in modify_call_for_omp_dispatch

At tree level, the addr ref is also required for array dummy arguments,
contrary to C; the GOMP_interop calls in modify_call_for_omp_dispatch
were updated accordingly (using build_fold_addr_expr).

As the GOMP_interop calls had no location data associated with them,
the init call happened as soon as executing the previous line of code,
which was confusing; solution: use the location data of the function
call itself.

PR middle-end/119662

gcc/ChangeLog:

* gimplify.cc (modify_call_for_omp_dispatch): Fix GOMP_interop
arg passing; add location info to function calls.

libgomp/ChangeLog:

* testsuite/libgomp.c/append-args-fr-1.c: New test.
* testsuite/libgomp.c/append-args-fr.h: New test.

gcc/testsuite/ChangeLog:
* c-c++-common/gomp/append-args-interop.c: Update for fixed
GOMP_interop call.
* g++.dg/gomp/append-args-8.C: Likewise.
* gfortran.dg/gomp/append-args-interop.f90: Likewise.
gcc/gimplify.cc
gcc/testsuite/c-c++-common/gomp/append-args-interop.c
gcc/testsuite/g++.dg/gomp/append-args-8.C
gcc/testsuite/gfortran.dg/gomp/append-args-interop.f90
libgomp/testsuite/libgomp.c/append-args-fr-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/append-args-fr.h [new file with mode: 0644]