https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127250
Bug ID: 127250
Summary: [OpenMP] append_args mishandled if 'interop' clause to
'dispatch' is 'omp_interop_none'
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: openmp, wrong-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
GCC currently uses the specified interop arguments of the 'interop' clause to
'dispatch'.
However, OpenMP meanwhile clarified:
"… If the OpenMP context for the call contains the dispatch trait with an
ordered list of interop properties that have not yet been consumed, the
first such property is consumed for the function dispatch;
if the property is not associated with 'omp_interop_none', its associated
interoperability object is appended as an argument.
Otherwise, if no such property exists or it is associated with
'omp_interop_none,' the 'interop' operation constructs an argument of
'interop' OpenMP type using the dispatch trait of the OpenMP context."
Thus, instead of just consuming the argument, a check whether it is
omp_interop_none is needed - and, if so, it still has to be be created
by the compiler.