Skip to content

Tail calls with indirect operands are untested #144293

@oli-obk

Description

@oli-obk

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.F-explicit_tail_calls`#![feature(explicit_tail_calls)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions