summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/array-value-initialize.cpp
blob: f041bc584b1291b27c764355c2d57eb506c068fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// RUN: clang-cc -emit-llvm -o - %s

// PR5463
extern "C" int printf(...);

struct S {
  double filler;
};

struct Foo {
        Foo(void) : bar_(), dbar_(), sbar_() { 
	  for (int i = 0; i < 5; i++) {
	    printf("bar_[%d] = %d\n", i, bar_[i]);
	    printf("dbar_[%d] = %f\n", i, dbar_[i]);
	    printf("sbar_[%d].filler = %f\n", i, sbar_[i].filler);
	  }
        } 

        int bar_[5];
        double dbar_[5];
        S sbar_[5];
};

int main(void)
{
        Foo a;
}