2020-05-20 21:39:19 +00:00
|
|
|
//@ revisions: rpass1 cfail1 rpass3
|
2021-12-29 14:14:50 +00:00
|
|
|
//@ needs-asm-support
|
2020-05-20 21:39:19 +00:00
|
|
|
//@ only-x86_64
|
|
|
|
// Regression test for issue #72386
|
|
|
|
// Checks that we don't ICE when switching to an invalid register
|
|
|
|
// and back again
|
|
|
|
|
2021-12-10 00:15:33 +00:00
|
|
|
use std::arch::asm;
|
2020-05-20 21:39:19 +00:00
|
|
|
|
|
|
|
#[cfg(any(rpass1, rpass3))]
|
|
|
|
fn main() {
|
2021-12-10 00:15:33 +00:00
|
|
|
unsafe { asm!("nop") }
|
2020-05-20 21:39:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(cfail1)]
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
asm!("nop",out("invalid_reg")_)
|
|
|
|
//[cfail1]~^ ERROR invalid register
|
|
|
|
}
|
|
|
|
}
|