https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115271
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The same issue occurs in the same file when an INTERFACE is involved:
module m
interface
integer function f ()
end
integer function g ()
!$omp declare variant(f) match(construct={dispatch})
end
end interface
end
use m
!$omp dispatch
i = g()
end
Here, no replacement happens. When replacing the interface by a module
function, it works.
