about summary refs log tree commit diff
path: root/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
blob: aef25d057d4babc413b5a1ea53aabd0ee708881f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//@ revisions: emit_mir instrument cfi

//@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer

// Make sure we don't try to emit MIR for it.
//@[emit_mir] compile-flags: --emit=mir

// Make sure we don't try to instrument it.
//@[instrument] compile-flags: -Cinstrument-coverage -Zno-profiler-runtime
//@[instrument] only-linux

// Make sure we don't try to CFI encode it.
//@[cfi] compile-flags: -Zsanitizer=cfi -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Clink-dead-code=true
//@[cfi] needs-sanitizer-cfi
//@[cfi] no-prefer-dynamic
// FIXME(#122848) Remove only-linux once OSX CFI binaries work
//@[cfi] only-linux

//@ build-pass
//@ needs-asm-support

use std::arch::global_asm;

fn foo() {}

global_asm!("/* {} */", sym foo);

fn main() {}