StmtPrinter: factor out arg printing code to PrintCallArgs
[clang.git] / test / CodeGen / 2008-07-30-implicit-initialization.c
blob8c719bb63cc39a3df13f21f432f69b21fc07b287
1 // RUN: %clang_cc1 -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];