diff options
| author | bors <bors@rust-lang.org> | 2018-02-06 07:02:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-02-06 07:02:25 +0000 |
| commit | b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e (patch) | |
| tree | fdea43c93e46ce70ebc3a9f102a0bfa37cd6e69b /src/test/codegen | |
| parent | 6c04c41034c46730fba97bfe9cfa2dd0687c2a5f (diff) | |
| parent | 0553dc81d38cf7bd81334477b0338ef46da50e18 (diff) | |
| download | rust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.tar.gz rust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.zip | |
Auto merge of #48017 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests - Successful merges: #46030, #47496, #47543, #47704, #47753, #47807, #47948, #47959, #48003, #48007 - Failed merges:
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/no-output-asm-is-volatile.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/codegen/no-output-asm-is-volatile.rs b/src/test/codegen/no-output-asm-is-volatile.rs new file mode 100644 index 00000000000..457d706a8ff --- /dev/null +++ b/src/test/codegen/no-output-asm-is-volatile.rs @@ -0,0 +1,26 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// 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 "", {{.*}} +} |
