blob: bbe574daa588d6596f14d6a51b29258fa7856534 [file] [log] [blame]
Galina Kistanova5a2675d2011-06-04 04:38:16 +00001// REQUIRES: x86-64-registered-target
Daniel Dunbara5728872009-12-15 20:14:24 +00002// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s
Fariborz Jahanian88f42802009-11-10 19:24:06 +00003// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
4
5extern "C" int printf(...);
6
7int count;
8
9struct S {
10 S() : iS(++count) { printf("S::S(%d)\n", iS); }
11 ~S() { printf("S::~S(%d)\n", iS); }
12 int iS;
13};
14
15
16S arr[2][1];
17S s1;
18S arr1[3];
19static S sarr[4];
20
21int main () {}
22S arr2[2];
23static S sarr1[4];
24S s2;
25S arr3[3];
26
Sean Callanan3b299012009-12-18 00:04:09 +000027// 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
34// CHECK-LP64: callq ___cxa_atexit