]> git.proxmox.com Git - rustc.git/blame - src/test/codegen/ffi-const.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / codegen / ffi-const.rs
CommitLineData
f9f354fc
XL
1// compile-flags: -C no-prepopulate-passes
2#![crate_type = "lib"]
3#![feature(ffi_const)]
4
5pub fn bar() { unsafe { foo() } }
6
5869c6ff 7extern "C" {
cdc7bbd5 8 // CHECK-LABEL: declare{{.*}}void @foo()
f9f354fc 9 // CHECK-SAME: [[ATTRS:#[0-9]+]]
487cf647
FG
10 // The attribute changed from `readnone` to `memory(none)` with LLVM 16.0.
11 // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}{{readnone|memory\(none\)}}{{.*}} }
f9f354fc
XL
12 #[ffi_const] pub fn foo();
13}