1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s
2 // RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm -o - %s
3 
4 // PR5463
5 extern "C" int printf(...);
6 
7 struct S {
8   double filler;
9 };
10 
11 struct Foo {
12         Foo(void) : bar_(), dbar_(), sbar_() {
13 	  for (int i = 0; i < 5; i++) {
14 	    printf("bar_[%d] = %d\n", i, bar_[i]);
15 	    printf("dbar_[%d] = %f\n", i, dbar_[i]);
16 	    printf("sbar_[%d].filler = %f\n", i, sbar_[i].filler);
17 	  }
18         }
19 
20         int bar_[5];
21         double dbar_[5];
22         S sbar_[5];
23 };
24 
25 int test1(void) {
26         Foo a;
27 }
28 
29 // PR7063
30 
31 
32 struct Unit
33 {
34   Unit() {}
35   Unit(const Unit& v)  {}
36 };
37 
38 
39 struct Stuff
40 {
41   Unit leafPos[1];
42 };
43 
44 
45 int main()
46 {
47 
48   Stuff a;
49   Stuff b = a;
50 
51   return 0;
52 }
53