array-construction.cpp revision ae013b9da64b48f22ca82828aa3c7a909f99dbd7
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 7extern "C" int printf(...); 8 9static int count; 10static float fcount; 11 12class xpto { 13public: 14 xpto() : i(count++), f(fcount++) { 15 printf("xpto::xpto()\n"); 16 } 17 int i; 18 float f; 19 20/** 21 NYI 22 ~xpto() { 23 printf("xpto::~xpto()\n"); 24 } 25*/ 26}; 27 28int main() { 29 xpto array[2][3][4]; 30 for (int h = 0; h < 2; h++) 31 for (int i = 0; i < 3; i++) 32 for (int j = 0; j < 4; j++) 33 printf("array[%d][%d][%d] = {%d, %f}\n", 34 h, i, j, array[h][i][j].i, array[h][i][j].f); 35} 36 37// CHECK-LP64: call __ZN4xptoC1Ev 38 39// CHECK-LP32: call L__ZN4xptoC1Ev 40 41