https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119541
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- The following seems to be the cleanest & simplest, namely to add it to the if (nappend < ninterop) error handling: --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -3949,6 +3949,7 @@ modify_call_for_omp_dispatch (tree expr, tree dispatch_clauses, : DECL_SOURCE_LOCATION (fndecl), "%<declare variant%> candidate %qD declared here", fndecl); + ninterop = nappend; } } if (dispatch_interop && !dispatch_device_num)