]> git.ipfire.org Git - thirdparty/gcc.git/commit
Only apply adjust_args in OpenMP dispatch if variant substitution occurs
authorPaul-Antoine Arras <parras@baylibre.com>
Mon, 6 Jan 2025 16:00:10 +0000 (17:00 +0100)
committerPaul-Antoine Arras <parras@baylibre.com>
Tue, 7 Jan 2025 15:01:44 +0000 (16:01 +0100)
commitaa688dd6302fd9fd4a6ede232bbe63781e672ae9
treea220bae1e424d0e3d583c8c894f11f25224a511d
parent405c99c17210a58df1adddd237219e773e689f17
Only apply adjust_args in OpenMP dispatch if variant substitution occurs

This is a followup to
084ea8ad584 OpenMP: middle-end support for dispatch + adjust_args.

This patch fixes a bug that caused arguments in an OpenMP dispatch call to be
modified even when no variant substitution occurred.

gcc/ChangeLog:

* gimplify.cc (gimplify_call_expr): Create variable
variant_substituted_p to control whether adjust_args applies.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/adjust-args-4.c: New test.
gcc/gimplify.cc
gcc/testsuite/c-c++-common/gomp/adjust-args-4.c [new file with mode: 0644]