about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-19 01:58:30 +0000
committerbors <bors@rust-lang.org>2018-01-19 01:58:30 +0000
commit9af8d42ec79558225043189e429e9d652ff89eab (patch)
tree385cea7a6d78c729c60990ae2e0950916f11f62f /src/test/codegen
parent3bd4af88bea2e6ecdd3455ed89b3ef1fc3500aa4 (diff)
parent9eb473579a19f456e53920dd6e6f8e75eb08dc62 (diff)
downloadrust-9af8d42ec79558225043189e429e9d652ff89eab.tar.gz
rust-9af8d42ec79558225043189e429e9d652ff89eab.zip
Auto merge of #47401 - rkruppe:issue-47278, r=eddyb
Compute LLVM argument indices correctly in face of padding

Closes #47278

r? @eddyb
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/issue-47278.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/codegen/issue-47278.rs b/src/test/codegen/issue-47278.rs
new file mode 100644
index 00000000000..21858b434bf
--- /dev/null
+++ b/src/test/codegen/issue-47278.rs
@@ -0,0 +1,19 @@
+// Copyright 2018 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.
+
+// -C no-prepopulate-passes
+#![crate_type="staticlib"]
+
+#[repr(C)]
+pub struct Foo(u64);
+
+// CHECK: define {{.*}} @foo(
+#[no_mangle]
+pub extern fn foo(_: Foo) -> Foo { loop {} }