blob: beef2fd94a234c26adab20f0d78efc3491451293 [file] [log] [blame]
NAKAMURA Takumi0acd8a72013-12-04 03:41:33 +00001// REQUIRES: x86-registered-target
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00002// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
Tim Northover19ae1172013-08-12 12:51:05 +00003// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00004// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
Tim Northover19ae1172013-08-12 12:51:05 +00005// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
Fariborz Jahaniane4d94ce2009-10-20 23:29:04 +00006
7
8extern "C" int printf(...);
9
10struct obj{ int a; float b; double d; };
11
12void foo(obj o) {
13 printf("%d %f %f\n", o.a, o.b, o.d);
14}
15
16int main() {
17 obj o = obj();
18 foo(obj());
19}
20
Sean Callanan12ca3f42009-12-18 00:04:09 +000021// CHECK-LP64: callq __Z3foo3obj
Fariborz Jahaniane4d94ce2009-10-20 23:29:04 +000022
Chris Lattner775e6352010-09-22 06:09:31 +000023// CHECK-LP32: calll __Z3foo3obj