Skip to content

inline_asm missing normalization #189

Closed
rust-lang/rust
#140302
@lcnr

Description

@lcnr

https://crater-reports.s3.amazonaws.com/pr-133502-4/try%230c7fed2b7584d310ca8221267fa1b3bec4df427f/reg/solana-account-decoder-2.1.21/log.txt

fn invoke(pc_section: &[usize]) {
    unsafe {
        std::arch::asm!(
            "/* {} */",
            in(reg) pc_section[0]
        );
    }
}

results in

error: cannot use value of type `<[usize] as Index<usize>>::Output` for inline assembly
 --> src/main.rs:5:21
  |
5 |             in(reg) pc_section[0]
  |                     ^^^^^^^^^^^^^
  |
  = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly

Metadata

Metadata

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions