From 9eb473579a19f456e53920dd6e6f8e75eb08dc62 Mon Sep 17 00:00:00 2001 From: Robin Kruppe Date: Fri, 12 Jan 2018 23:32:14 +0100 Subject: Compute LLVM argument indices correctly in face of padding Closes #47278 --- src/test/codegen/issue-47278.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/codegen/issue-47278.rs (limited to 'src/test/codegen') 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 or the MIT license +// , 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 {} } -- cgit 1.4.1-3-g733a5