2020-04-19 05:05:28 -05:00
|
|
|
// compile-flags: -Zunleash-the-miri-inside-of-you
|
|
|
|
// only-x86_64
|
2020-06-01 13:53:45 -05:00
|
|
|
#![feature(asm,llvm_asm)]
|
2020-04-19 05:05:28 -05:00
|
|
|
#![allow(const_err)]
|
|
|
|
|
|
|
|
fn main() {}
|
|
|
|
|
2020-04-19 13:21:26 -05:00
|
|
|
// Make sure we catch executing inline assembly.
|
2020-06-01 13:53:45 -05:00
|
|
|
static TEST_BAD1: () = {
|
2020-04-19 05:05:28 -05:00
|
|
|
unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
|
|
|
|
//~^ ERROR could not evaluate static initializer
|
|
|
|
//~| NOTE inline assembly is not supported
|
2020-04-21 11:24:41 -05:00
|
|
|
//~| NOTE in this expansion of llvm_asm!
|
2020-05-03 07:23:08 -05:00
|
|
|
//~| NOTE in this expansion of llvm_asm!
|
2020-04-19 05:05:28 -05:00
|
|
|
};
|
2020-06-01 13:53:45 -05:00
|
|
|
|
|
|
|
// Make sure we catch executing inline assembly.
|
|
|
|
static TEST_BAD2: () = {
|
|
|
|
unsafe { asm!("nop"); }
|
|
|
|
//~^ ERROR could not evaluate static initializer
|
|
|
|
//~| NOTE inline assembly is not supported
|
|
|
|
};
|