diff options
Diffstat (limited to 'tests/incremental/issue-72386.rs')
-rw-r--r-- | tests/incremental/issue-72386.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/incremental/issue-72386.rs b/tests/incremental/issue-72386.rs new file mode 100644 index 000000000..5917152e1 --- /dev/null +++ b/tests/incremental/issue-72386.rs @@ -0,0 +1,21 @@ +// 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 + } +} |