1 // RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s &&
2 // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
3 // RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s &&
4 // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s &&
5 // RUN: true
6 
7 extern "C" int printf(...);
8 
9 
10 struct C {
11 	C() : iC(6) {}
12 	int iC;
13 };
14 
15 int foo() {
16   return 6;
17 };
18 
19 class X { // ...
20 public:
21 	X(int) {}
22 	X(const X&, int i = 1, int j = 2, int k = foo()) {
23 		printf("X(const X&, %d, %d, %d)\n", i, j, k);
24 	}
25 };
26 
27 int main()
28 {
29 	X a(1);
30 	X b(a, 2);
31 	X c = b;
32 	X d(a, 5, 6);
33 }
34 // CHECK-LP64: call	__ZN1XC1ERK1Xiii
35 // CHECK-LP64: call	__ZN1XC1ERK1Xiii
36 // CHECK-LP64: call	__ZN1XC1ERK1Xiii
37 // CHECK-LP32: call	L__ZN1XC1ERK1Xiii
38 // CHECK-LP32: call	L__ZN1XC1ERK1Xiii
39 // CHECK-LP32: call	L__ZN1XC1ERK1Xiii
40