about summary refs log tree commit diff
path: root/src/test/codegen/no-output-asm-is-volatile.rs
blob: ad497b25a9ec52e8330b41bf4d3c616002428e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// compile-flags: -O

// ignore-asmjs

#![feature(asm)]
#![crate_type = "lib"]

// Check that inline assembly expressions without any outputs
// are marked as having side effects / being volatile

// CHECK-LABEL: @assembly
#[no_mangle]
pub fn assembly() {
    unsafe { asm!("") }
// CHECK: tail call void asm sideeffect "", {{.*}}
}