Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s |
Fariborz Jahanian | 88f4280 | 2009-11-10 19:24:06 +0000 | [diff] [blame] | 2 | // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s |
| 3 | |
| 4 | extern "C" int printf(...); |
| 5 | |
| 6 | int count; |
| 7 | |
| 8 | struct S { |
| 9 | S() : iS(++count) { printf("S::S(%d)\n", iS); } |
| 10 | ~S() { printf("S::~S(%d)\n", iS); } |
| 11 | int iS; |
| 12 | }; |
| 13 | |
| 14 | |
| 15 | S arr[2][1]; |
| 16 | S s1; |
| 17 | S arr1[3]; |
| 18 | static S sarr[4]; |
| 19 | |
| 20 | int main () {} |
| 21 | S arr2[2]; |
| 22 | static S sarr1[4]; |
| 23 | S s2; |
| 24 | S arr3[3]; |
| 25 | |
Sean Callanan | 3b29901 | 2009-12-18 00:04:09 +0000 | [diff] [blame] | 26 | // CHECK-LP64: callq ___cxa_atexit |
| 27 | // CHECK-LP64: callq ___cxa_atexit |
| 28 | // CHECK-LP64: callq ___cxa_atexit |
| 29 | // CHECK-LP64: callq ___cxa_atexit |
| 30 | // CHECK-LP64: callq ___cxa_atexit |
| 31 | // CHECK-LP64: callq ___cxa_atexit |
| 32 | // CHECK-LP64: callq ___cxa_atexit |
| 33 | // CHECK-LP64: callq ___cxa_atexit |