summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/call-arg-zero-temp.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:22:18 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:22:18 +0000
commit5563df30b9c8d1fe87a54baae0d6bd86642563f4 (patch)
tree3fdd91eae574e32453a4baf462961c742df2691a /test/CodeGenCXX/call-arg-zero-temp.cpp
parente5557c18e5d41b4b62f2af8a24af20eba40b0225 (diff)
downloadFreeBSD-src-5563df30b9c8d1fe87a54baae0d6bd86642563f4.zip
FreeBSD-src-5563df30b9c8d1fe87a54baae0d6bd86642563f4.tar.gz
Update clang to r84949.
Diffstat (limited to 'test/CodeGenCXX/call-arg-zero-temp.cpp')
-rw-r--r--test/CodeGenCXX/call-arg-zero-temp.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/call-arg-zero-temp.cpp b/test/CodeGenCXX/call-arg-zero-temp.cpp
new file mode 100644
index 0000000..2c44f69
--- /dev/null
+++ b/test/CodeGenCXX/call-arg-zero-temp.cpp
@@ -0,0 +1,23 @@
+// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s &&
+// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
+// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s &&
+// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s &&
+// RUN: true
+
+
+extern "C" int printf(...);
+
+struct obj{ int a; float b; double d; };
+
+void foo(obj o) {
+ printf("%d %f %f\n", o.a, o.b, o.d);
+}
+
+int main() {
+ obj o = obj();
+ foo(obj());
+}
+
+// CHECK-LP64: call __Z3foo3obj
+
+// CHECK-LP32: call __Z3foo3obj
OpenPOWER on IntegriCloud