blob: 27607c1c754453f0d1fb5f3db51a719b873f1572 [file] [log] [blame]
Chris Lattner985f7392010-05-06 06:35:23 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s
2// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm -o - %s
Fariborz Jahaniane8b31cc2009-11-11 17:55:25 +00003
4// PR5463
5extern "C" int printf(...);
6
7struct S {
8 double filler;
9};
10
11struct 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
Chris Lattner985f7392010-05-06 06:35:23 +000025int test1(void) {
Fariborz Jahaniane8b31cc2009-11-11 17:55:25 +000026 Foo a;
27}
28
Chris Lattner985f7392010-05-06 06:35:23 +000029// PR7063
30
31
32struct Unit
33{
34 Unit() {}
35 Unit(const Unit& v) {}
36};
37
38
39struct Stuff
40{
41 Unit leafPos[1];
42};
43
44
45int main()
46{
47
48 Stuff a;
49 Stuff b = a;
50
51 return 0;
Chris Lattner124b3de2010-12-21 02:36:58 +000052}