Skip to content

MIPS64: dead code in classify_arg aggregate classification #503

@SebTardif

Description

@SebTardif

Bug

In compiler/rustc_target/src/callconv/mips64.rs, the classify_arg function contains dead code in the aggregate classification path. When processing aggregate types, the function enters a loop that processes fields but never uses the accumulated results in certain code paths, leading to wasted computation.

This was found during the Round 66 ABI calling conventions audit. The code is not wrong (it does not produce incorrect results), but the dead paths indicate either missing logic or unnecessary complexity.

Location

compiler/rustc_target/src/callconv/mips64.rs

Impact

No runtime impact (dead code, not wrong behavior). The dead paths should either be removed or completed with the intended logic.

Found in

Round 66, ABI calling conventions audit (2026-06-20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-abiABI and calling conventionsP-lowLow impact: edge case or niche scenariobugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions