diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 | 
| commit | 73490b890977362d28dd6326843a1ecae413921d (patch) | |
| tree | 3fdd91eae574e32453a4baf462961c742df2691a /test/CodeGenCXX/call-arg-zero-temp.cpp | |
| parent | a5f348eb914e67b51914117fac117c18c1f8d650 (diff) | |
Diffstat (limited to 'test/CodeGenCXX/call-arg-zero-temp.cpp')
| -rw-r--r-- | test/CodeGenCXX/call-arg-zero-temp.cpp | 23 | 
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 000000000000..2c44f69d975e --- /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 | 
