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
6 extern "C" int printf(...);
9 B() : B1(3.14), B2(3.15), auB2(3.16) {}
13 printf("B1 = %f B2 = %f auB1 = %f\n", B1, B2, auB1);
16 B& operator=(const B& arg) { B1 = arg.B1; B2 = arg.B2;
17 auB1 = arg.auB1; return *this; }
25 M() : M1(10), M2(11) , auM1(12) {}
29 printf("M1 = %d M2 = %d auM1 = %d auM2 = %d\n", M1, M2, auM1, auM2);
38 N() : N1(20), N2(21) {}
42 printf("N1 = %d N2 = %d\n", N1, N2);
43 for (unsigned i = 0; i < 3; i++)
44 for (unsigned j = 0; j < 2; j++)
45 printf("arr_b[%d][%d] = %f\n", i,j,arr_b[i][j].B1);
48 N& operator=(const N& arg) {
49 N1 = arg.N1; N2 = arg.N2;
50 for (unsigned i = 0; i < 3; i++)
51 for (unsigned j = 0; j < 2; j++)
52 arr_b[i][j] = arg.arr_b[i][j];
59 Q() : Q1(30), Q2(31) {}
63 printf("Q1 = %d Q2 = %d\n", Q1, Q2);
69 X() : d(0.0), d1(1.1), d2(1.2), d3(1.3) {}
75 printf("d = %f d1 = %f d2 = %f d3 = %f\n", d, d1,d2,d3);
95 // CHECK-LP64: .globl __ZN1XaSERKS_
96 // CHECK-LP64: .weak_definition __ZN1XaSERKS_
97 // CHECK-LP64: __ZN1XaSERKS_:
98 // CHECK-LP64: .globl __ZN1QaSERKS_
99 // CHECK-LP64: .weak_definition __ZN1QaSERKS_
100 // CHECK-LP64: __ZN1QaSERKS_:
102 // CHECK-LP32: .globl __ZN1XaSERKS_
103 // CHECK-LP32: .weak_definition __ZN1XaSERKS_
104 // CHECK-LP32: __ZN1XaSERKS_:
105 // CHECK-LP32: .globl __ZN1QaSERKS_
106 // CHECK-LP32: .weak_definition __ZN1QaSERKS_
107 // CHECK-LP32: __ZN1QaSERKS_: