mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
22 lines
418 B
Rust
22 lines
418 B
Rust
//@ revisions: rpass1 cfail1 rpass3
|
|
//@ needs-asm-support
|
|
//@ only-x86_64
|
|
// Regression test for issue #72386
|
|
// Checks that we don't ICE when switching to an invalid register
|
|
// and back again
|
|
|
|
use std::arch::asm;
|
|
|
|
#[cfg(any(rpass1, rpass3))]
|
|
fn main() {
|
|
unsafe { asm!("nop") }
|
|
}
|
|
|
|
#[cfg(cfail1)]
|
|
fn main() {
|
|
unsafe {
|
|
asm!("nop",out("invalid_reg")_)
|
|
//[cfail1]~^ ERROR invalid register
|
|
}
|
|
}
|