Add include needed for MSVC.
[clang/acc.git] / test / CodeGen / 2008-07-30-implicit-initialization.c
blob2f4c14eb728b4c79a1d8fabe9eea621755703277
1 // RUN: clang-cc -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t &&
2 // RUN: grep "ret i32" %t | count 2 &&
3 // RUN: grep "ret i32 0" %t | count 2
4 // <rdar://problem/6113085>
6 struct s0 {
7 int x, y;
8 };
10 int f0() {
11 struct s0 x = {0};
12 return x.y;
15 #if 0
16 /* Optimizer isn't smart enough to reduce this since we use
17 memset. Hrm. */
18 int f1() {
19 struct s0 x[2] = { {0} };
20 return x[1].x;
22 #endif
24 int f2() {
25 int x[2] = { 0 };
26 return x[1];