1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O2 -o - | FileCheck %s 2 static int count = 0; 3 4 struct S { 5 S() { count++; } 6 ~S() { count--; } 7 }; 8 9 struct P { 10 P() { count++; } 11 ~P() { count--; } 12 }; 13 14 struct Q { 15 Q() { count++; } 16 ~Q() { count--; } 17 }; 18 19 struct M : Q, P { 20 S s; 21 Q q; 22 P p; 23 P p_arr[3]; 24 Q q_arr[2][3]; 25 }; 26 27 // CHECK: define i32 @_Z1fv() nounwind 28 int f() { 29 { 30 count = 1; 31 M a; 32 } 33 34 // CHECK: ret i32 1 35 return count; 36 } 37