mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			417 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			417 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// compile-flags: -C no-prepopulate-passes
 | 
						|
#![crate_type = "lib"]
 | 
						|
#![feature(ffi_const)]
 | 
						|
 | 
						|
pub fn bar() { unsafe { foo() } }
 | 
						|
 | 
						|
extern "C" {
 | 
						|
    // CHECK-LABEL: declare{{.*}}void @foo()
 | 
						|
    // CHECK-SAME: [[ATTRS:#[0-9]+]]
 | 
						|
    // The attribute changed from `readnone` to `memory(none)` with LLVM 16.0.
 | 
						|
    // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}{{readnone|memory\(none\)}}{{.*}} }
 | 
						|
    #[ffi_const] pub fn foo();
 | 
						|
}
 |