blob: ed8118e07d929bce8d223a21ce0668bee4113d85 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
Daniel Dunbara5728872009-12-15 20:14:24 +00003// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00004// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s
Fariborz Jahanian48620ba2009-10-20 23:29:04 +00005
6
7extern "C" int printf(...);
8
9struct obj{ int a; float b; double d; };
10
11void foo(obj o) {
12 printf("%d %f %f\n", o.a, o.b, o.d);
13}
14
15int main() {
16 obj o = obj();
17 foo(obj());
18}
19
Sean Callanan3b299012009-12-18 00:04:09 +000020// CHECK-LP64: callq __Z3foo3obj
Fariborz Jahanian48620ba2009-10-20 23:29:04 +000021
22// CHECK-LP32: call __Z3foo3obj