Skip to content

Intrinsic parameter error location is incorrect #4465

@P-E-P

Description

@P-E-P

When using a rust intrinsic, the error is located on the intrinsic declaration instead of the call location.

Extract from rust/bswap.rs:

extern "rust-intrinsic" {
    pub fn bswap<T>(x: T) -> T; // { dg-error "bswap intrinsics can only be used with basic integer types .got 'bool'." }
}

fn main() {
    let _ = bswap(true);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions