https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118791

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
My understanding is that the intent is for the variant function to have (except
for the simd special case which according to the ABI can tweak stuff) always
the same argument types as the base function, so not have int && in one case
and int in another or vice versa etc., after all, the replacement can happen
during the compilation at any time, not just in the FE, but during early GIMPLE
stages or even after IPA in some cases.  And at that point there is no FE to
deal with remapping int argument to int && or similar.  Dunno if OpenMP 6.0
allows dynamic declare variant, even if not, some newer version could have
that.  And it is much better to just be able to do indirect call through one
function pointer in that case, rather than dealing with special cases, for this
variant one needs to use such and such thunk etc.

Reply via email to