In #144232 (comment) the code path for indirect arguments to tail called functions is
- untested
- ICEing if actually hit
So we first need to find a test actually exercising this code path, but then fixing it will either be hard, or we need to reject types that would hit it earlier in the compiler, restricting what types you can use in tail call arguments.
Orthogonal: We need to generally increase our test coverage of runtime tail calls (const eval covers them well enough for const-eval purposes already, but more don't hurt, and with const fn being callable in const eval and in runtime code, that should be easy to write as tests that share code).
In #144232 (comment) the code path for indirect arguments to tail called functions is
So we first need to find a test actually exercising this code path, but then fixing it will either be hard, or we need to reject types that would hit it earlier in the compiler, restricting what types you can use in tail call arguments.
Orthogonal: We need to generally increase our test coverage of runtime tail calls (const eval covers them well enough for const-eval purposes already, but more don't hurt, and with
const fnbeing callable in const eval and in runtime code, that should be easy to write as tests that share code).