• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // REQUIRES: x86-64-registered-target
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
3 // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
4 
5 extern "C" int printf(...);
6 
7 int count;
8 
9 struct S {
SS10   S() : iS(++count) { printf("S::S(%d)\n", iS); }
~SS11   ~S() { printf("S::~S(%d)\n", iS); }
12   int iS;
13 };
14 
15 
16 S arr[2][1];
17 S s1;
18 S arr1[3];
19 static S sarr[4];
20 
main()21 int main () {}
22 S arr2[2];
23 static S sarr1[4];
24 S s2;
25 S arr3[3];
26 
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
34 // CHECK-LP64: callq    ___cxa_atexit
35