blob: 101e81f8ef7969785a407e0b6f3cc34a86161002 [file] [log] [blame]
Galina Kistanova0ccb31c2011-06-03 22:24:54 +00001// REQUIRES: x86-registered-target,x86-64-registered-target
Daniel Dunbara5728872009-12-15 20:14:24 +00002// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00003// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
Daniel Dunbara5728872009-12-15 20:14:24 +00004// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00005// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s
Fariborz Jahanian48620ba2009-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 Callanan3b299012009-12-18 00:04:09 +000021// CHECK-LP64: callq __Z3foo3obj
Fariborz Jahanian48620ba2009-10-20 23:29:04 +000022
Chris Lattner398e6b92010-09-22 06:09:31 +000023// CHECK-LP32: calll __Z3foo3obj